clean up gateway headers
properly extract autoack

fixes #1888
hasher should throw
rebase
Merge pull request #1890 from Particular/GatewayHeaderCleanup

clean up gateway headers