FoundationDB/sql-layer — pull request #1048 by nathanlws (2013-11-14 16:18:49+00:00)
Title: Fix HEX and add BINARY input support

The common.funcs.Hex helper wasn't really general so move it all to MHex.

Update Guava dependency so Strings.hex() helper can just pipe it off to BaseEncoding.base16().

Changes/fixes:
- MString resultType calculation didn't include character set maxBytesPerCharacter, so it would underestimate.
- MBigint resultTyep attempted to get StringAttributes, which isn't valid
- MBigint output was lowercase, STRING was uppercase
- MBinary overload, which means support for BINARY, VARBINARY and BLOB.

Note that for MString and MBigint, I chose to saturate to Integer.MAX_LENGTH as various chained castings, defaults and BLOBs comes through with a N already there. Multiplying by 2 would rollover and then MVarchar.instance() clamps to zero, which seemed even worse. This, among many other places presumably, will need to react when we really support large objects.