Add timer_deinit and call it just before doing a soft-restart

This fixes #733.
Merge branch 'add-timer-deinit' of github.com:dhylands/micropython into dhylands-add-timer-deinit
stmhal: Some reordering of code/functions.
Merge branch 'dhylands-add-timer-deinit'