First move in isolating logic

I removed the setup, resize and input logic from loop, so it only sets up and listens on its channels. createFrontend should see further reduction in the future.

Unittests slightly expanded, although they contain rather "stupid" tests. I wasn't particularly creative there.

I hope this is good enough as a "first step towards simple logic and unittestability". I am happy to hear if there are any ideas or criticism towards my approach.
This positions the status bar at the end. I intend to use the last line for an input panel (show_input_panel style), but admittedly, this is a change that somehow slipped from my other branches. I can remove it if wanted, although it will then arrive in another pull request.