avoid exception when saving empty associations

As mentioned in https://github.com/remiprev/her/issues/245 `her` seems to raise an exception when trying to save an object that is based on a JSON response with empty arrays for the associations. The problem was that `next` would return nil and then crash when trying to merge the result with a hash in `to_params`.