Add flash read/write test.

--BRJ
Fix bizarre thread-safety issues in packet data.

Observed on flash reads. Moved the buffer and endpoint to class
variables so that there is only ever one copy of them.

--BRJ and CAR
read_flash interface consistency

Everywhere else we accept an uint32_t for numWords, so do it here, too.

This commit also changes flash writes to be chunked in groups of 256
bytes (64 32-bit words), consistent with the spec. We're not actually
sure if this is necessary.

--BRJ
hexn templated pretty-printer.

Adds an easier to understand hexn pretty printer that prints hex values
of a fixed width, i.e.
cout << hexn<8> << x;

will print:
0x0000BADD