Restrict rails to ~> 4.0.  4.1.0 causes errors with mailboxer

ActiveRecord::StatementInvalid:
       SQLite3::SQLException: near "*": syntax error: SELECT
       COUNT(DISTINCT conversations.*, DISTINCT conversations.*) FROM
       "conversations" INNER JOIN "notifications" ON
       "notifications"."conversation_id" = "conversations"."id" AND
       "notifications"."type" IN ('Message') INNER JOIN "receipts" ON
       "receipts"."notification_id" = "notifications"."id" WHERE
       "notifications"."type" = 'Message' AND "receipts"."mailbox_type"
       = 'inbox' AND "receipts"."trashed" = 'f' AND "receipts"."deleted"
       = 'f' AND "receipts"."receiver_id" = 1 AND
       "receipts"."receiver_type" = 'User' AND "receipts"."is_read" =
       'f'
Merge pull request #370 from projecthydra/rails_4.0

Restrict rails to ~> 4.0.  4.1.0 causes errors with mailboxer
Refactor Trophies javascript.
All trophy scripts should use the TrophyHelper#display_trophy_link
Add the `trophy-class` back to the user's profile page.
The script now updates the link text depending on the current state of
the trophy.
Trophies should work with Turbolinks now.