Game loop in thread. Window can close.

Fuck yeah
Merge branch 'thread'