MD5 and truncate ActiveSupport::Cache keys that are longer than 250 characters

A pretty common scenario in a Rails app is to use a URI as a cache key, since URIs can be longer than couhbase's 250 limit.  The idea and implementation came largely from Dalli.