Modernize conversion of request headers map to JS object

Reported by Jonathan Boston on this mailing list thread: https://groups.google.com/d/msg/pedestal-users/KbRsgSKfxSo/ClsTYH_Ft5AJ.