Restructure the routing table code.

The routing table code was a mess. Move the concept of "Self" into the
routing table code and use the local Self variable to maintain the
format of the routing table. This simplifies calls to the routing table
since we don't have to pass lots of parameters.

Canonicalize the order we use to pass parameters to the routing table.
Enforce the parameter order such that the table itself is the last
parameter to the function. This is consistent with Erlang in general, as
seen in e.g., `lists:member(Elem, List)`. Since there is no currying in
the language, the construct where the subject comes first is less
useful.

Make sure that all callers do the right thing as well.
Work through spec's in the routing table code.

Make sure the specs are correct. This helps further usage of the library
by guarding errors at a later stage.