ktimer_event_handler: remove dead code
Reduce compiler optimization to avoid runtime crash

gcc -O1 is known to cause Memory fault. At present, we disable
optimizations as workaround.