Fixed periodic halting.

Increased stack size of write and control threads.

Increased Sample buffer size from 128 to 256.

Decreased CH_TIME_QUANTUM from 20 to 2 to ensure that write thread can't run
for more than 2ms; this ensures the blocking nature of f_write doesn't screw
with the control timing.

Added names to control and write threads and changed the threads functions so
you can see the name.