py: Fix unix-cpy to compile with uint->mp_uint_t changes.
Implement missing ARM emitter functions for viper
Merge pull request #889 from Vogtinator/master

Implement missing ARM emitter functions for viper
stmhal: Adjust computation of SYSCLK to retain precision.
stmhal: Allow pyb.freq() function to change SYSCLK frequency.

Eg pyb.freq(120000000) sets the CPU to 120MHz.  The frequency can be set
at any point in the code, and can be changed as many times as you like.
Note that any active timers will need to be reconfigured after a freq
change.

Valid range is 24MHz to 168MHz (but not all freqs are supported).  The
code maintains a 48MHz clock for the USB at all times and it's possible
to change the frequency at a USB REPL and keep the REPL alive (well,
most of the time it stays, sometimes it resets the USB for some reason).
Note that USB does not work with pyb.freq of 24MHz.
Enable unicode for Windows port so unicode tests give correct uPy output
Exclude some tests which always fail on windows
Merge pull request #891 from stinos/windows-tests

windows tests fixes
tests: Make printing of floats hopefully more portable.
stmhal, timer: Set freq from float; get timer source freq.

Timers now have the following new features:
- can init freq using floating point; eg tim.init(freq=0.1)
- tim.source_freq() added to get freq of timer clock source
- tim.freq() added to get/set freq
- print(tim) now prints freq
stmhal, timer: Improve accuracy of freq computation.
stmhal, timer: Fix timer.chanel so mode can be a keyword.
stmhal: Add config option to disable/enable CAN driver.
py: Make compiler return a proper exception on SyntaxError.
py: Implement proper context save/restore for eval/exec; factor code.

This has benefits all round: code factoring for parse/compile/execute,
proper context save/restore for exec, allow to sepcify globals/locals
for eval, and reduced ROM usage by >100 bytes on stmhal and unix.

Also, the call to mp_parse_compile_execute is tail call optimised for
the import code, so it doesn't increase stack memory usage.
stmhal: Use mp_uint_t where appropriate.

Found these by compiling stmhal with mp_uint_t of type uint32_t instead
of unsigned int.  This actually makes a difference to the code, but just
a curiosity.
unix: Detect and print compile error.
tests: Add check for micropython.native and then skip relevant tests.

If micropython.native decorator doesn't compile, then we skill all
native/viper tests.

This patch also re-enables the ujson_loads test on NT.

Addresses issue #861, and partially addresses issue #856.
py: Try to autodetect machine endianness when not defined by port.
py: Make int.to_bytes work on big endian machine.

Partly addresses issue #856.