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

Change-Id: I035194033d65bed825f8e3772b05450bc1a2c35f
Reviewed-on: http://review.couchbase.org/29783
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>