Make yaml a gem dependency

Instead of loading the standard library yaml module from different
places in the codebase, we load it at gem initialization instead.