CurlFile - update 03

This is part of larger PR #3226 (other parts: #3462, #3464).

This PR will move header parsing logic from CurlFile directly to HttpHeader, add 'AddParam' and 'GetCharset' functions to HttpHeader and add 'GetServerReportedCharset' function to CurlFile.

Some fixes and refactoring included.