Add formspec toolkit and refactor mainmenu to use it