sniffer: allocate queue earlier
sniffer: Show queue length in non-binary mode
Initial version of the ota module

This module allows over-the-air upgrading other scouts. To use it, run
"scout.otaboot" on the other scout to reboot it in OTA mode (it will
stay in OTA mode for 10 seconds, or indefinitely if it receives any
valid packet).

Then, on another scout with this commit, enable the "ota" module and run
the ota commands:

	> module.enable("ota")
	> ota.ping(0xffff)
	>
	PONG {'short_addr':0x0005, 'status':0x00, 'errno':0x0000,'appname': 'wibo', 'boardname':'pinoccio', 'version':0x05, 'crc':0x0000}

	> ota.ping(5)
	> No ping reply

	> ota.ping(5)
	>
	PONG {'short_addr':0x0005, 'status':0x00, 'errno':0x0000,'appname': 'wibo', 'boardname':'pinoccio', 'version':0x05, 'crc':0x0000}

ota.ping just tries a single pin, without retries, all other command
retry a few times. Ping either accepts a target address, or 0xffff to do
a broadcast.

To actually flash something, use a sequence of ota.start to select the target, any number of
ota.block to send data and ota.end to reboot the target again.

	> ota.start(5, 1)
	>
	OK

	> ota.block(0, "DEADBEEF")
	>
	OK

	> ota.end
	>
	OK

ota.start takes the address of a target and 0 for normal flashing and 1 for a
dry run (everything is sent over, but the target doesn't do the actual
flashing).

ota.block preferably needs data in multiples of the flash page size (256
bytes). If shorter blocks are passed, they are padded with 0xff bytes (so the
padding actually overwrites data!). Normally, this padding should only be
needed for the final block.

ota.block also supports passing a size instead of a hex string, then it will
read a NUL byte followed by size bytes from serial directly (in binary, not hex
encoded).

All ota commands are coded so they eventually always print either "OK" or
"FAIL" (on a line by itself), allowing a script to easily parse the result
(since the bitlash command returns before the operation is completed).
ota: Actually send the address in send_set_address

Without this, every set address packet resets to address 0, causing
retries to break the flash.
ota: Add ota.clone command

This replaces a series of ota.block commands by sending the flash
contents of the scout running it (excluding bootloader) to the target.
To use it, use ota.start, ota.clone and ota.end.

This also sends over all trailing 0xff bytes in the flash, since the
code does not know where the sketch code ends. Skipping all trailling
0xff bytes is also not possible, since the sketch might actually contain
some trailing 0xff bytes (e.g. some data). For this reason, we just
always send over _all_ flash contents.
ota: Add delay between data packets

It seems that when the target is flashing a page, it is too busy to
receive further pages. Adding this delay fixes this for now, but this
needs something better.