Some threading cleanups for Mini-OS/ARM

* Call exit_thread automatically when a thread returns.
    
* Tidied up thread switching with ldm/stm and made it pass the thread's user data argument through to the thread.

* Fixed HYPERVISOR_shutdown (I don't know what "low_shutdown" was supposed to do, but it didn't exist).