[WIP] Settings menu

This builds on #535, and implements a 'Settings' submenu as per #399. Applications can register items to appear in the settings menu using the `register_settings_menu_item` hook, just like `register_admin_menu_item` for the top-level menu.

The CSS/JS for the submenu (6947e9204b9d3ed1dc4895eaba4363adb5efa48a) has intentionally been left ugly and minimally functional so that I'm not riding roughshod over the existing frontend code... it should now be at a suitable point for @davecranwell to pick up from and do the job properly :-)