unix: Fix mpconfig.h not being included before misc.h

This fixes count_lead_ones in misc.h not compiling due to unknown types
Merge pull request #729 from stinos/fix-include-order

unix: Fix mpconfig.h not being included before misc.h
py: Make unichar_charlen() accept/return machine_uint_t.
stmhal: Include mpconfig.h before all other includes.

It defines types used by all other headers.

Fixes #691.