Collection singular ids setter fixed.

I made a patch for a bug that I found in AR: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5125-collection_singular_ids-method-raises-an-exception-when-primary_key-is-string-rails-3

I'm looking for some people to review it. It is a very simple patch with tests included.

I hope you can find time for it.