Add memory debugging functions

This code was taken from
http://andybrown.me.uk/wk/2011/01/01/debugging-avr-dynamic-memory-allocation/
and modified to:
 - Include the full license header
 - Not depend on #ifdef DEBUG.
 - Add a include guard to the .h file
Add scout.free bitlash command

This prints some more detailed memory information, instead of just
returning the number of free bytes like the regular free function.
Improve some debug output
Minor code formatting fix
Add StringBuffer class

This class will help simplify the handling of various buffers in this
library. It uses the Arduino String class for handling the memory, but
adds some methods that make efficient use of the String class easier
(which is not otherwise possible since it needs access to protected
members).
Let StringBuffer reserve memory block by block

Specifically, this adds a reserveBlock() method that does the same as
the regular reserve method (make sure the buffer size is at least the
value passed), but rounds the allocation size up to a multiple of the
block size (which is passed to the constructor).

Note that reserveBlock is only used by the StringBuffer methods and not
by the inherited String methods and operators. Specifically, this means
that using e.g. += will not do block reservation, but e.g. appendSprintf
will.
Add PrintToString class and printToString function

The class allows creating a Print object that prints to a string in
memory.

The function allows the same, but requires creating a new
function for every String printed to and requires the String to be
non-static global variables. This limits the usefulness of the function,
but until bitlash learns how to redirect its output to Print objects
instead of functions, this function should do.
Remove some duplicate function definitions
Add include guards to util/StringBuffer.h
Add StringBuffer::addJsonString() method

This method copies a string into the Stringbuffer, applying JSON-style
escaping and optionally also putting quotes around it.
Convert most buffers to use StringBuffer

This uses the StringBuffer object for most buffers in ScoutHandler.cpp
and Shell.cpp. The StringBuffer objects encapsulate all memory
management, automatically freeing up their memory when they go out of
scope.

Additionally, when returning a StringBuffer object, the compiler
automatically causes the StringBuffer object itself to be allocated by
the caller (return value optimization) and the buffer is not copied
(copy-elision) but just passed to the caller and automatically freed in
the caller.

When passing a buffer or string argument, some cases are modified to use
a const String&, but sometimes a const char* is still used, because
there isn't always a String object available in the caller (and creating
one currently always involved copying the entire string). This part
should be cleaned up a bit, but it's less important (since converting a
String or StringBuffer to char* is easy with the c_str() method).
Add free() for remaining memory leaks
Let leadSignal accept a const String&

Every caller had a StringBuffer object that was converted to a char*, so
might a well pass the actual object.

Inside leadSignal, the String is now passed to the wifi client print
method instead of write. This means that the length stored in the
String object is used, saving a strlen call.
Add ConstString and ConstBuf classes

These classes make it easier to pass char* around, without forcing the
complete string copy that would be needed to turn them in to regular
String objects.
fix leadsignal
Add StringBuffer::concat version for uint8_t*
fix string
Pass a ConstBuf& instead of char* where possible

Previously, char* were passed, even when they were not guaranteed to be
nul-terminated (in particular, packets received over the mesh were not
guaranteed to be nul-terminated). Now, a ConstBuf object is passed,
which includes the length, preventing out-of-bounds reads.

This removes most of the c_str() calls from ScoutHandler. The ones
remaining are for interfacing with external things, like bitlash, js0n
and sprintf, which we cannot change to accept anything else.
Remove debug print from StringBuffer
Allow passing a ConstBuf to StringBuffer::appendJsonString

Indirectly, this also allows passing a char*, String& and StringBuffer&,
so the original char* version can be removed.