Refactor webui so that we have a template, webui/web/js/config.js.tmpl, instead of the /api/gateways to retrieve the gateways listing. This also restructures the css theme into separate common files for easier maintenance.