UPDATE: added hook for a thread terminate event
UPDATE: added thread terminate hook and PORT_SYSTMR_RELOAD macro
- some doxygen correction and added missing prototypes