Convert layers to YAML

Closes #711

Although requiring a script is not ideal, the JSON MML file couldn't be sanely edited anyways. The advantages are

* Sane merge conflict resolution
* Not always a merge conflict for edits to the same SQL
* Reasonable code reviews of SQL changes. Currently I don't review most SQL changes since they're very hard to get a handle on when escaped into a single line of JSON
* Easier changing of database settings. With YAML aliases, they only need to be specified once

I think it'd be easiest to merge this then rebase other merges on top of it - the one-time conversion from JSON to YAML is not trivial, as a great deal of work had to be done by hand to clean up the YAML.
Missing capitzalization in END and AS