py: Automatically ake __new__ a staticmethod.

Addresses issue #622.
tests: Rename test scripts, changing - to _ for consistency.

From now on, all new tests must use underscore.

Addresses issue #727.
binary: Factor out mp_binary_set_int().
Disable IRQs around sdcard reads.

Once the code switches to using DMA, this can be removed.
stmhal: Protect SD_WriteBlocks by IRQ disable/enable pair.
Merge branch 'dhylands-fix-sdcard-read'
moductypes: Foreign data interface module, roughly based on ctype ideas.

But much smaller and memory-efficient. Uses Python builtin data structures
(dict, tuple, int) to describe structure layout.
moductypes: Add symbolic constants to specify bitfield position/length.
Add keyword argument 'memaddr_use_16b' to i2c.mem_read and mem_write methods
to allow these methods to transmit 16 bit addresses to an i2c device
Add 'memaddr_use_16b' to qstrdefsport.h
Incorporate stylistic changes suggested by @dhylands
emitbc: Fix structure field alignment issue.

dummy_data field is accessed as uint value (e.g.
in emit_write_bytecode_byte_ptr), but is not aligned as such, which causes
bus errors or incorrect behavior on any arch requiring strictly aligned
data (ARM pre-v7, MIPS, etc, etc).
py: Add generic helper to align a pointer.
run-tests: Add option to write CPython's test results to .exp files.

Mostly to run testsuite on targets which doesn't have CPython.
unix: Allow to disable MICROPY_EMIT_X64 from commandline.

emitnative in particular requires nlr_* to be real functions, so doesn't
compile with MICROPY_NLR_SETJMP=1.
test: Add run-tests-exp.sh, script to run testsuite with only sh dependency.

This script uses expected test results as generated by run-tests --write-exp,
and requires only standard unix shell funtionality (no bash). It is useful
to run testsuite on embedded systems, where there's no CPython and Bash.
unix: file: Implement .flush() method.

This method apparently should be part of stream interface.
stream: Factor out mp_stream_write() method to write a memstring to stream.
unix: file: No fsync() on Windows.
Fix teensy to build on latest tree.

Put #include of mpconfig.h before misc.h
Replace uses of ARRAY_SIZE with MP_ARRAY_SIZE
Add core files and use same toolchain as stmhal