Add backwards compatibility for filter_parameters in Rails3

Commit e93132c added support for Rails 4, but it broke the automatic
filter_parameters in Rails 3. This adds backwards compatibility for
Rails 3.
Add tests, minor refactor for Rails 3 functionality
Merge pull request #277 from polleverywhere/rails3_filter_parameters

Add backwards compatibility for filter_parameters in Rails 3