use YAML rather than JSON for configuration files

JSON is an excellent tool for simple data interchange between servers,
but is a royal pain as a configuration file format which must also be
written and read by human beings.  The difference between valid and
invalid JSON is often down to a single character in hard-to-spot places:

    { "valid_json?":
      { "lets":
        ["play",
         "spot",
         "the",
         "syntax",
         "errors",
       ]
      },
    }

(It gets even worse if you want to _generate_ valid JSON in the context
of, say, an ERB/moustache template file: ugly logic must be invoked to
make sure that lists are terminated correctly.)

Even worse: correct JSON does not allow for comments. And while you can
certainly do:

    { "this_dict": {
        "has": "values",
        "and": "a",
        "comment": "which is me!" }
    }

...it's much harder to do something like this:

    { "this_dict": {
        # TODO: restore when bug #7 closes
        # "has": "values",
        # "and": "a",
        "comment": "which is me!" }
    }

...whereas all of the above strings are valid and correct YAML.
don't require backends to have names

but still make the stats socket readable if a name exists
don't set names for dns watchers

they don't add any additional information
Fix discovery when some containers have no forwarded ports

In the new API, docker can return nil in the JSON to indicate a container
has no ports forwarded. This notably happens when you're using the 'docker build'
command, and breaks synapse's discovery for the duration.

If you have a long running container with no ports forwarded, then
it's just always broken.

This fixes that bug and breaks out rewrite_container_ports into it's own
method as it's complex enough to justify it. Tests are added for the
3 (old/new/nil) cases that this method deals with
zookeeper: look for the backend name in the node data

this is instead of looking for it in the node name, which is properly metadata.
this allows us to always generate ephemeral sequence ids for nerve node names
and still have readable information in haproxy
allow leader election by controlling backends returned

this is an alternate approach to airbnb/synapse#29 which is not tied to particular
service watchers. as long as the watcher ads a numeric ID field to each backend hash,
a leader can be elected.

if a leader cannot be elected, we fail hard by returning no backends
Merge pull request #43 from airbnb/allow_master_selection

Allow master selection
Merge pull request #26 from memory/yaml-conf

use YAML rather than JSON for configuration files
fix yaml parsing

always return a ruby object from the parsing function
bump version to 0.9.0
same yaml parsing code as nerve
Merge pull request #47 from airbnb/fix_yaml

same yaml parsing code as nerve
bump version to 0.9.1

0.9.0 is broken and should not be used
Merge pull request #46 from bobtfish/travis_ci

Add support for running spec testing on commit with Travis CI
Merge pull request #45 from bobtfish/fix_docker_discovery_nill_ports

Fix discovery when some containers have no forwarded ports