Additional tests and fixes for form helpers to support new CollectionProxy

Another pair of tests and fixes for form helpers to ensure they won't break on new CollectionProxy and behave the same way they did in Rails 3.
See #8623 and #9014