modhtp: Gracefully handle all LibHTP callbacks after TX close
Squashed 'libs/libhtp/' changes from 5c1c5ad..d1c16de

d1c16de Fix the urlencoded parser to not add an empty key pair when given zero-length input. Tidy up. Add tests for the parser.
e0a8b92 More tests for htp_decode_urlencoded_inplace(). Fix ability to control if string is terminated at encoded NUL byte.
4e10749 Do not leak memory under low memory conditions.
48819c7 Remove dead code.

git-subtree-dir: libs/libhtp
git-subtree-split: d1c16ded18ae07b3f839dc7eceaf278e7995f9c3
libhtp: Sync with upstream 0.5.x branch.