Added event flags service, plus core improvements

- Added the new event flags service, you can create, pend and post a
flag very useful to signal a task when a event occurs;

- Core improvements to speed up task context switch and now you can
return a task (must not a infinite loop), now measured switch context
time and a surprising good performance was noted, only 5us without any
optimisations  in release mode