[base16] Add generic base16 encoding and decoding routines