For review: patch to config.gem behavior

Ticket 1128 - http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1128

Short summary: make vendor'd gems behave like regular gems. Add tests
to verify
correct loading of frozen gems.

Many thanks in advance for your feedback!

--Matt