Fix Gemfile dependencies for Rails 4.1 and use Minitest if available

Fallback to test/unit in case minitest is not available, which should be
necessary for Ruby 1.8.7 only.