Add a script that takes a yaml file and converts it to a JSON file

Requires PyYAML. If this dependency is an issue on a particular
platform, pretty much any language allows you to do this.

A ruby example is

    ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))' < project.yml > project.json
Convert the MML file from JSON to YAML

This one-time conversion was done with the json2yaml node module,
and then substantially reformatted by hand, using mappings and alias
to avoid repeating projection and extents information for each layer,
and to get consistent ordering of the properties of each layer. The
latter does not matter semantically, but makes editing with a text
editor cleaner.

By using the scripts/yaml2mml.py script, the YAML can be converted
back into JSON, which is still what TileMill uses.

A JSON-aware diff of the original project.mml and the new generated
one shows that the only differences are the new "_parts" property,
used for aliases and ignored by TileMill, and layer extents.

The script can be invoked with

    scripts/yaml2mml.py < project.yaml > project.mml

The project.mml file remains checked in to git, as TileMill requires
it and this allows someone to clone the repo, and immediately have
it work. Merge conflicts in project.mml are trivial to solve, as
the entire file is just regenerated by running the script again.

This does mean that the .MML file should not be edited directly,
but this is fine, as editing the JSON by hand is extremely difficult
anyways! The HOT OSM style has a similar workflow, making use of cartocc.
Use alias to avoid duplicating SQL connection information

By using aliases, we can avoid having to specify the same information
repeatedly, saving lines, avoiding mistakes, and making it easier to
use a differently named database.

The last is evident in that the landcover extents changed slightly
in this, because they were different than all the other layers.
Conver SQL from in-line escaped scalars to block scalars

Block scalars allow you to use newlines, and are far more readable

This commit also catches some extents that were missed previously.
Clean up SQL in the YAML file

A lot of the SQL was badly formatted, with random tabs, caps, and
lines of 5000 characters. This commit cleans up about half of them
but is not complete.
Add documentation on YAML and SQL to CONTRIBUTING.md
Add PyYAML to dependencies, but only if editing the MML file
Fix typo and missed caps/quotes
Whitespace fixes
More caps fixes
Merge branch 'yaml' of https://github.com/pnorman/openstreetmap-carto into pnorman-yaml
Resync with yaml.
Merge branch 'pnorman-yaml'
Rephrase some yaml-related information.
Use single backticks for inline code unless the code itself contains backticks
Layout changes SQL
Major rewrite landcover labelling

This commit changes the rendering of landcover labels.

For the purpose of this commit, with 'landcover label' we mean text connected to
a background colour or pattern rendering, and not connected to an icon.

* All rendered landcover tags now have their name rendered (resolves #537). We
  add labels to the following tags:
  * natural=beach,scrub,grassland,heath,sand,desert (partially resolves #788)
  * highway=services,rest_area (resolves #575)
  * aeroway=apron
  * power=station,generator,substation,sub_station
  * tourism=zoo
  * military=barracks
* The minimum zoom level of labels is now defined based on the number of pixels
  rendered (resolves partially #703, resolves #861, resolves #913).
  Labels are rendered from 3000 pixels (but never earlier than the corresponding
  landuse is rendered).
* Font size now also depends on way_pixels. In other words, larger objects get
  a larger label, in three steps (resolves #308).
* Landuse labels are now rendered oblique, to easier visually tell them apart
  from village and POI labels.
* All labels are rendered in a colour similar to the landuse they belong to
  (using landuse color variables, resolves #56). Also some existing colours
  are changed, in order to make them clearly colourful but still readable.
* The text-halo-radius and text-wrap-width properties are made consistent across
  landuse types.
* Font-size, wrap-width an face-name are now defined by easy to change
  variables.