Pull updates from yamldb

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