Fixed some potential bugs related to optimziation of timeout-based blocking calls.
Also resized some stacks used in unit tests such that they do not overflow (either sim or real HW).
Authored by: m0slevin 2015-03-05
Parent: [r194]
Child: [r196]