[test] Add self-tests for base16

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[base16] Generalise base16_decode() to hex_decode()

Provide a generic hex_decode() routine which can be shared between the
Base16 code and the "hex" and "hexhyp" settings parsers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[settings] Use hex_decode() to parse hex settings

Use hex_decode() to parse "hex" and "hexhyp" settings.  Note that this
parser is stricter than the old parser; it now requires exactly two
hex digits for each byte.  (The old parser was based upon strtoul()
and so would allow leading whitespace and a leading plus or minus
sign.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[settings] Add "hexraw" setting type

Originally-implemented-by: Jeppe Toustrup <ipxe@tenzer.dk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>