Allow the use of binary data for sharding keys

Previously the keys were only allowed to be null-terminated strings.  This fix adds a length field that is passed down through the call chain allowing keys to contain 0 bytes.