Improve charset auto-detection in ql_http_get*()

Spin ql_http_detect_charset() off ql_http_get(), and expand it with better
regular expressions and more content-type coverage.
Cosmetic and comment fixes