Moved the code inside TheLoop.loop's while loop into its
own function so that it could be tested easier.

Remove TheLoopTest.test_loop and added TheLoopTest.test_loop_iter
Fixed unit tests for Ticker caused by unmocked conf variable