add [] and []= accessors for attributes

Advantages:
* Nicer syntax
* Compatibility with Nokogiri
Apologies for the pedantics, but could you add an empty line before `alias_method` here? Same with the other alias below.