Major reorganization work towards supporting app execution on background threads.

Ignore-this: 5b696e002b84f1900452be3c5666ab7a

This commit is a major reorganization in the app interface.
I seperated the gui code from the backend app code. Now the backend talks via an front end interface,
and the frontend talks to backend via a backend interface. These interfaces do not assume
QT or Lua.

This is a step towards the goal of having the backend run on a seperate thread.

It also makes it possible in the future to use a different UI. The immediate goal
is to try QtQuick instead of QWidgets so that porting to phone becomes easier.

Also it opens up possibility of other languages besides Lua, though why would we want that? ;-)

darcs-hash:20141018062518-c21fe-9a81c276fd21b68b149b38eb2570717bf796ef79
made the mailbox more generic

Ignore-this: 62358b15f02fa877d8819ed194a8fa98

darcs-hash:20141018063302-c21fe-3922ea19b6cd246b33495168357909a29810c8e2
removing dup functions

Ignore-this: 8fd69418f536335f1a597cd6b0f20c17

darcs-hash:20141018063509-c21fe-fc0137718f7e7a4e1412bcad9382d85472395c00
removed unused func

Ignore-this: c2792072205c39be3f30574c13508edf

darcs-hash:20141018063733-c21fe-a24ee3b7248955953b1849792950721107719453