syncbase: Change id encoding in store keys to preserve sorting.

Changed id encoding in store keys from the wire encoding
encodeName("<blessing>,<name>") to "<blessing>\0<name>\0".
The new encoding preserves the natural sort order (lexicographically,
first by blessing, then by name).

The new encoding removes the need for sorting when scanning databases,
collections, and rows.

Syncgroups use a hash in keys instead; changed syncgroup sort routine
to sort by blessing first instead of name first, added test to confirm.

MultiPart: 1/3
Change-Id: I1dae34e5661879692b139125f82ecba8672633d0
8 files changed