IAR support for running main() in a thread.

- Some new config macros to control the auto main thread.
- Changed basic_test.cpp to use the auto main thread.
- IAR project file updates.