Fix wakeup of solution thread.

Check timer counter when resetting period and use a semaphore to
wake up.  Fixes #69

<!---
@huboard:{"order":106.5,"milestone_order":140,"custom_state":""}
-->

Maybe put "WARNING:" in the string or something so it stands out more as an abnormal condition?