Proper GZIP testing

Test for a GZIP'd using magic bytes.  See the appropriate answer on
Emacs.SE (1) for details.

(1): http://emacs.stackexchange.com/a/2978
Include encoding functions
Use correct function name
Simplify logical structure
Merge pull request #38 from vermiculus/gzip-testing

Proper GZIP testing