fix($http): ensure default headers PUT and POST are different objects

send PUT and POST through copy() to make sure they are not the same.
Include unit test.

Closes #5742