Reorganize RFC 822 and RFC 2616 parsing functions

Refactor a few functions to divide tasks in a way that both makes more
sense and allows to remove code from the now-renamed
ql_parse_rfc822_header(), which now has no special-case for HTTP-specific
header fields.

Also delete ql_http_get_cached(), which is only used by tools that are
being translated into Python.