pub fn encode_utf8(val: &str, descending: bool, key: &mut Vec<u8>)
Encodes a UTF-8 string as memcomparable bytes.
Appends the raw bytes followed by a null terminator. For descending order, flips all bits.