Fix logic to select SafeLRU when using Rails 4

Modified commit below from mlarraz.

> Currently, whether to use thread safe caching or not is determined by
> calling Rails.configuration.allow_concurrency.
>
> This is set inside config.threadsafe!, which is deprecated in Rails 4.
>
> Thread safety is turned on by default in Rails 4, as long as
> config.cache_classes and config.eager_load are both true.
>
> This pull requests allow Rails 4 apps to use SafeLRU without setting
> deprecated config options.
>
> References:
> http://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html
> rails/rails@5d416b9
Merge pull request #23 from companygardener/rails4

Fix logic to select SafeLRU when using Rails 4