Ruby 1.9 compatibility fixes

This series of patches fixes syntax and API changes between ruby 1.8 and ruby 1.9.

Tested by installing an admin node running on ruby 1.9, then enabling all barclamps.

API changes in hash.select were also unit-tested.