stmhal: Update and improve LCD driver.

Still some method names to iron out, and funtionality to add, but this
will do for the first, basic version.
stmhal: Fix file print methods to use print instead of printf.

Also make stdout_print_strn static (ultimately this function needs to be
merged with stdout_tx_strn).
stmhal: Fix type signatures on functions that take variable args.
stmhal: Add Python function to set UART for REPL.

This adds a hook to get/set pyb_uart_global_debug from Python, using
pyb.repl_uart().  You can set it to an arbitrary UART object, and then
the REPL (in and out) is repeated on this UART object (as well as on USB
CDC).

Ultimately, this will be replaced with a proper Pythonic interface to
set sys.stdin and sys.stdout.
Updated teensy to build.

Refactored some stmhal files which are shared with teensy.
gc: More verbose debugging

Add more DEBUG_printf statements to trace gc behaviour
Fix problem with ADC reads and multiple channels
stmhal: Toggle LED using ODR ^= pin_mask.
Merge pull request #698 from dhylands/adc-fix

Fix problem with ADC reads and multiple channels
gc: Keep debug statements at beginning of scope where possible
gc: Turn off debugging info again
bare-arm, stmhal: Fix --nostdlib to -nostdlib

-nostdlib is the correct option, gcc recognizes the double dash version
when in link-only mode, but not when compiling.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
bare-arm, stmhal, teensy: Duplicate -nostdlib to CFLAGS

As we are building with -nostdlib gcc features like the stack protector
will fail linking, because the failure handlers are in gcc's internal
libs. Such features are implicitly disabled during compilation when
-nostdlib is used in CFLAGS too.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Merge pull request #700 from swegener/for-upstream

bare-arm, stmhal: Disable stack protector
Add MICROPY_HW_MICRO_NAME to boards config
Add missing “assert.h” file header inclusion from “nlr.h”
Prefix ARRAY_SIZE with micropython prefix MP_
bench: Add test for function call overhead.

For a trivial operation, calling a function is 5 times slower than doing
operation inline.
bench: Add tests for constructing various containers from iterator.

Both "bound" (like, length known) and "unbound" (length unknown) are tested.
All of list, tuple, bytes, bytesarray offer approximately the same
performance, with "unbound" case being 30 times slower.
bench: Add test for map() vs inplace operations in array-likes.

map() is 5 times slower. That's mostly because of inefficiency of creating
containers from iterables of unknown length (like map()).