added some examples for the Accept-Encoding header
moved accept header parsing to a slightly better place
detect whether gzip is an accepted and preferred content encoding
changed things as requested by pull request review
Merge pull request #1989 from asflierl/1983_correctly_handle_accept_encoding_gzip

correctly handle accept encoding gzip