Fix intermittent test failures on 12.04

SQLite on 12.04 has issues with binary data containing null bytes and
sorting when using pre-built SQL strings(as opposed to parameter
binding).  See related bug for more information.

This patch adjusts so that binary UUID's are always run through
DatabaseBase::encodeBlob so the database can optionally wrap it in a
Blob object and correctly encode the binary data on query. This causes
binary data to be output as hex literals for sqlite.  Interestingly
with sqlite on 12.04 binary data without null characters is accepted
in the string, but does not sort the same as binary data provided via
hex literal. As such all binary data needs to be encoded to hex
literals.

The blob encoding happens within UUID::getBinary, which keeps the
changes fairly localized.  TreeRepository was using binary uuids
as array keys for a binary -> alphadecimal lookup table after retrieving
from the database.  The patch changes that to use the binary -> object
lookup table already populated in UUID::create().

[1] I12fb4bd339be19137fffba2e47a70741382f6a8c

Bug: 72367
Change-Id: Icbab916825eb839cc9c2f70d1d427af84fe52bb2