Update util functions

Cribbed from http://api.rubyonrails.org/classes/Hash.html#method-i-symbolize_keys
Merge pull request #2273 from jpiasetz/copy-rails-functions