Template follows main code changes
New scheduler option and priority levels checking is now in line with
main code
System timer function are a bit more tweaked, code is now configurable
Kernel threads stack size is now defined by the port
Minor comment correction
Added a missing wfi instruction