Split main.c into mainloop and app portions

Some of main.c is focused on the event loop, and belogns in core/mainloop. The rest is much higher level, though.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information