Changes for URI 2.0 format.

Lots of refactoring of internal key encoding.
Changes that allow clients and servers to send or recieve 2.0 URI format.
Added many tests to test both 1.0 and 2.0

RB=247966
R=gogenc,kjin,kparikh,nshankar,si-dev
A=gogenc