Move the Snap-specific code to a single module, to allow backends using other webservers.
These are based on linter output, but they look sane.
monitor.js had (in just a few places) tabs and whitespace-at-EOL.
This adds the framework for being able to actually store and retrieve labels as part of the server. They are exported in the json objects, but the client-side files will be updated in a separate patch.
This is used to hold Text values, which are free-form and can be used for (e.g.) hostname, command line, etc. I've used Text, but I'm not sure whether String would make more sense for (what are supposed to be) such small values.
This is needed for reference types which don't necessarily have an Int type (for example, they could be Text, or Double, etc.).