Introduced the strongly-typed TID for the Client API

Those raw Strings have been making me twitch for ages -- they're a
recipe for stupid errors.  Went through and changed them to TID, which
is the abstraction of "a name for a Thing".  Huge code changes, but
mostly mechanical.