Another thought is there's supposed to a pocket of air in the water heater to allow expansion of the water as it's heated. Try completely draining the hot water tank and refilling it. That will renew the air pocket and should help with any water hammer.
If the pump is "hammering" while it's running, it's probably because the water lines to or from the pump are rattling against the walls of the wet compartment. See if you can reposition those lines to stop the noise. A pad of some sort might help between the wall and the water line at the point of contact.