Move game logic to model classes

When this application was created it was more or less just a playground
for working with GTK+. Large part of the game logic was placed in the
widget classes, and this soon turned out to make it really hard to add
new features.

Break all of the game logic out of the view classes and move it to
proper model classes.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>