*: Port Christians tweaks for 32-bit route tags

Port over Christian's tweaks from his port of my commit widening the
route-tag field width to 32-bit.  Commit dc9ffce8786844
 "*: Consistently support 32-bit route tags".

with "changes which make this actually useful for all the daemons".

This is missing the zebra route-map changes.
diff --git a/lib/routemap.c b/lib/routemap.c
index 7302e23..c392226 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -1299,6 +1299,32 @@
   1
 };
 
+/* Common route map rules */
+
+void *
+route_map_rule_tag_compile (const char *arg)
+{
+  unsigned long int tmp;
+  char *endptr;
+  route_tag_t *tag;
+
+  errno = 0;
+  tmp = strtoul(arg, &endptr, 0);
+  if (arg[0] == '\0' || *endptr != '\0' || errno || tmp > ROUTE_TAG_MAX)
+    return NULL;
+
+  tag = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(*tag));
+  *tag = tmp;
+
+  return tag;
+}
+
+void
+route_map_rule_tag_free (void *rule)
+{
+  XFREE (MTYPE_ROUTE_MAP_COMPILED, rule);
+}
+
 /* Initialization of route map vector. */
 void
 route_map_init_vty (void)