nghttp2_hd: Refactor a bit