Rewrite JS to use requirejs

This is because I _someday_ plan to have plug-and-play panels.
Restructure the board to be more versatile

The plan is to be able to pick your own widgets and board style, so this change is the setup which may bring that about.