Import parser

Pretty much a straight copy of fog/core/parser.rb (minus ToHashDocument which is already in fog/xml).

While doing this I found that `attr_value` has been broken for some time, by [this change](https://github.com/fog/fog/commit/0283cac5), which had the side effect of changing attrs from a array of name/value pairs to an array of Attribute structs, which meants that `attr_value` will always return nil

As far as I can tell the only thing using it in fog is voxel.