Close IRQ when doing context switch.  Contex switch processing
in PendSV is usually preempted by sampling function.

fixes issue #40