Rails 4 Upgrade

This pull request contains all changes required to get popHealth working with rails 4.0.