Decrease memory allocations in cache.rb
Decrease memory allocations in cache.rb

The `merged_options` method is private and the output is never mutated.
Using this info we can get rid of the `dup` behavior. We can also
eliminate the `merge` call in the case where all the options being merged are the same.

Returned results are frozen as an extra layer of protection against
mutation.

Before

```
Total allocated: 741749 bytes (6642 objects)
```

After

```
Total allocated: 734039 bytes (6648 objects)
```

Diff

```
(741749 - 734039) / 741749.0 => ~ 1.0 %
```

If you don't feel comfortable modifying this method, we could rename it
and only use it internally.
utilum/rails,fabianoleittes/rails,vipulnsward/rails,schuetzm/rails,yhirano55/rails,starknx/rails,Stellenticket/rails,notapatch/rails,jeremy/rails,repinel/rails,flanger001/rails,rafaelfranca/omg-rails,starknx/rails,yhirano55/rails,eileencodes/rails,yawboakye/rails,rails/rails,georgeclaghorn/rails,Stellenticket/rails,palkan/rails,yalab/rails,shioyama/rails,yalab/rails,yahonda/rails,kmcphillips/rails,flanger001/rails,MSP-Greg/rails,lcreid/rails,flanger001/rails,EmmaB/rails-1,Erol/rails,lcreid/rails,Envek/rails,fabianoleittes/rails,repinel/rails,Stellenticket/rails,Vasfed/rails,yawboakye/rails,starknx/rails,schuetzm/rails,tjschuck/rails,Edouard-chin/rails,Erol/rails,fabianoleittes/rails,joonyou/rails,vipulnsward/rails,utilum/rails,vipulnsward/rails,Edouard-chin/rails,rails/rails,gauravtiwari/rails,jeremy/rails,rails/rails,gauravtiwari/rails,BlakeWilliams/rails,Envek/rails,tjschuck/rails,yhirano55/rails,baerjam/rails,kmcphillips/rails,Edouard-chin/rails,Stellenticket/rails,bogdanvlviv/rails,arunagw/rails,fabianoleittes/rails,yahonda/rails,jeremy/rails,betesh/rails,schuetzm/rails,arunagw/rails,BlakeWilliams/rails,kddeisz/rails,flanger001/rails,gauravtiwari/rails,baerjam/rails,yawboakye/rails,yawboakye/rails,Envek/rails,EmmaB/rails-1,vipulnsward/rails,betesh/rails,mechanicles/rails,esparta/rails,lcreid/rails,esparta/rails,yalab/rails,MSP-Greg/rails,prathamesh-sonpatki/rails,baerjam/rails,joonyou/rails,palkan/rails,jeremy/rails,palkan/rails,kmcphillips/rails,baerjam/rails,schuetzm/rails,tgxworld/rails,eileencodes/rails,mechanicles/rails,lcreid/rails,tjschuck/rails,BlakeWilliams/rails,yalab/rails,kddeisz/rails,Vasfed/rails,kddeisz/rails,bogdanvlviv/rails,iainbeeston/rails,prathamesh-sonpatki/rails,mechanicles/rails,arunagw/rails,joonyou/rails,EmmaB/rails-1,rafaelfranca/omg-rails,yhirano55/rails,kddeisz/rails,Erol/rails,georgeclaghorn/rails,repinel/rails,betesh/rails,tgxworld/rails,arunagw/rails,betesh/rails,tgxworld/rails,Envek/rails,rails/rails,Edouard-chin/rails,mechanicles/rails,MSP-Greg/rails,kmcphillips/rails,palkan/rails,utilum/rails,bogdanvlviv/rails,repinel/rails,Vasfed/rails,notapatch/rails,esparta/rails,prathamesh-sonpatki/rails,shioyama/rails,prathamesh-sonpatki/rails,notapatch/rails,iainbeeston/rails,joonyou/rails,BlakeWilliams/rails,esparta/rails,georgeclaghorn/rails,eileencodes/rails,MSP-Greg/rails,Erol/rails,bogdanvlviv/rails,notapatch/rails,tjschuck/rails,yahonda/rails,yahonda/rails,georgeclaghorn/rails,iainbeeston/rails,iainbeeston/rails,eileencodes/rails,Vasfed/rails,rafaelfranca/omg-rails,shioyama/rails,shioyama/rails,tgxworld/rails,utilum/rails