Make tests pass in 1.9:

* upgrade nokogiri
* upgrade rspec
* use released mocha, shoulda gems
* get rid of some crufty testing stuff
* fix some code production code related to 1.9 differences
  - Array#to_s
  - String#each_with_index