Fix routing rules.

Fix the rules in RouteController as per the latest iteration of the routing
design: http://go/android-multinetwork-routing. Changes include:

+ The legacy tables have to be global. So remove the UID being passed in to
  modifyRoute() and remove the associated TODOs.

+ Add UID=0 rules to let the kernel access routes on privileged networks.

+ Add a UID=0 clause to the directly-connected hack, thus fixing the TODO.

+ Add the privileged_legacy table just above the legacy table, when overriding
  the default network. (The same table remains added at the top of the rule
  chain, to override VPNs, but only for CONNECTIVITY_INTERNAL-privileged apps).

Other cosmetic changes:
+ Update the names and values of the rule priorities.
+ Move the legacy table IDs to the .h file in anticipation of using them from
  bugreport / dump commands.
+ Make 'action' the first parameter consistently.

Change-Id: I6634a19ddc8062b2ef55d926c7892fff8c586106
diff --git a/server/NetworkController.cpp b/server/NetworkController.cpp
index 0ce82c3..7fe90cd 100644
--- a/server/NetworkController.cpp
+++ b/server/NetworkController.cpp
@@ -371,8 +371,8 @@
         tableType = RouteController::INTERFACE;
     }
 
-    return add ? RouteController::addRoute(interface, destination, nexthop, tableType, uid) :
-                 RouteController::removeRoute(interface, destination, nexthop, tableType, uid);
+    return add ? RouteController::addRoute(interface, destination, nexthop, tableType) :
+                 RouteController::removeRoute(interface, destination, nexthop, tableType);
 }
 
 NetworkController::UidEntry::UidEntry(uid_t uidStart, uid_t uidEnd, unsigned netId,