add mode switching to new BMS code

using experimental Json communcation, for testing.
fixed several bugs in NU
added read_line method to nu::Serial
also, statically allocate the BPS object, so it's visible to pic32
exception-handling code.