gzip: fix --suffix=z bug (Bug#18239)

* gzip.c (get_suffix): Put --suffix string at the end
of the list of suffixes if it is a suffix of one one them.
* tests/z-suffix: New file.
* tests/Makefile.am (TESTS): Add it.