Use merge rather than update to avoid mutation

There's no need to mutate the auth headers in place since they're being
set to a new variable `preferences`.
Fix bug in response body when upserting one item

The XML parser returns a hash for:

    @response.body[:upsert_list_response][:write_response_list][:write_response]

when there is only one record upserted.  I added a test to reproduce the
bug and fixed it by making sure the value of `:write_response` is always
an array.

    > Array[{a: 1, b: 2}].flatten
    => [{:a=>1, :b=>2}]
    > Array[[{a: 1, b: 2}]].flatten
    => [{:a=>1, :b=>2}]
Add test coverage to .upsert_list

I want to make sure this is working as expected with one customer.
Fix bug in upsertList request body generation
Merge branch 'gregg/no-mutating'
Merge branch 'gregg/custom-field-list'
Merge branch 'upsert-one-item'
Merge branch 'gregg/upsert-list-errors'