Implement kwargs for builtin open() and _io.FileIO

This makes open() and _io.FileIO() more CPython compliant.
The mode kwarg is fully iplemented.
The encoding kwarg is allowed but not implemented; mainly to allow
the tests to specify encoding for CPython, see #874
Use mode/encoding kwargs in io and unicode tests

mode argument is used to assert it works
encoding argument is used to make sure CPython uses the correct encoding
as it does not automatically use utf-8
Merge pull request #922 from swegener/for-upstream

stmhal: Set entry point for ELF binary debugging
py: Deactivate more code without MICROPY_PY_SYS

When compiler optimization has been turned on, gcc knows that this code
block is not going to be executed. But with -O0 it complains about
path_items being used uninitialized.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
bare-arm: Add dummy __assert_func

Required to build bare-arm with debugging.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>