Thread new IRQ api

Addresses comments from https://github.com/RIOT-OS/RIOT/pull/1889
You have to restoreIRQ before sched_switch.