This provides the ability to generate really small delays - it's often
the case that wait_us() takes multiple microseconds to set up, so
having an alternative suitable for <10us delays is useful.
There have been a few local implementations - it makes sense to
centralise them as they need retuning for each new ARM core.
Based on the local implementation inside the Atmel 802.15.4 driver.
API's updated as:
1. wait(float) calls wait_ms for >=0.01s and not in interrupt, else wait_us.
2. wait_ms() is just the thread sleep and doesn't lock hardware sleep.
In order to have backward compatibility, if used in ISR `wait_us` is
called if MBED_TRAP_ERRORS_ENABLED is false
3. wait_us() is a ticker-based wait, always spinning.
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.