Fixes saving nil nested attributes in 3.0.19, 3.1.10, 3.2.11 (see #8832)

in ActionPack due to empty hashes and arrays in
params being replaced with nil.

Because actionpack now strips empty collections from
params, this causes NestedAttributes::assign_nested_attributes_for_collection_association to raise an ArgumentError.

This commit fixes that behavior by defaulting nil
collections to an empty hash.