py: Add arg checking helper functions.

These are to assist in writing native C functions that take positional
and keyword arguments.  mp_arg_check_num is for just checking the
number of arguments is correct.  mp_arg_parse_all is for parsing
positional and keyword arguments with default values.
stm: Update to compile with latest changes to core py.
stmhal: Add SPI class.

Also some updates to compile with latest changes to core py.
stmhal: Tidy up and improve consistency across modules.
stmhal: Update ExtInt to allow keyword arguments in constructor.
stmhal: Only init RNG if it's used.
py: Fix mp_arg_parse_all.
stmhal: Small bug fixes and simplifications.
Merge branch 'master' of github.com:micropython/micropython