add [] and []= accessors for attributes

Advantages:
* Nicer syntax
* Compatibility with Nokogiri
I'd prefer if this was written as `return the value of an attribute when using the #[] alias`.