Pull updates from yamldb

This brings forward all relevant updates authored for the short-lived yamldb/yamldb fork. It does not include fixes that originated in yaml_db pull requests, so test failures on Rails 3.0 and >=4.0 are expected.