gzip_wrapper: fix nasty speed/compression regression

Final pre-release tests threw up an odd regression in compression
and speed with the gzip_wrapper.c code.  Sample filesystem compression
was ~0.025% (or 1Mbyte extra per 4Gbytes of compressed data) worse
than the previous Mksquashfs 4.2.

A git bisect rather unexpectedly narrowed the culprit down to this
line in gzip_wrapper.c

res = deflateInit2(stream, compression_level, Z_DEFLATED,
		window_size, 9, Z_DEFAULT_STRATEGY);

This replaced the equivalent

res = deflateInit(stream, compression_level);

When the gzip_wrapper code was extended to allow the window_size
used in compression to be changed.

The culprit in the line is the 9, which is the amount of memory
deflate uses to compress the data.  I took advantage of the fact
that deflateInit2() allows one to increase the memory usage from the
default of 8 (used by deflateInit()) to the maximum of 9.  As explained
by the comments in zlib.h, this is supposed to increase speed.

From zlib.h

"    The memLevel parameter specifies how much memory should be allocated
   for the internal compression state.  memLevel=1 uses minimum memory but is
   slow and reduces compression ratio; memLevel=9 uses maximum memory for
   optimal speed.  The default value is 8.  See zconf.h for total memory usage
   as a function of windowBits and memLevel. "

It in fact appears from my tests that increasing the value from 8 to 9
both reduces compression and reduces speed too.  This is probably
a bug in zlib ...

Using the default value of 8, rather than 9, fixes the small compression
and speed regression observed.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
mksquashfs: fix LOWMEM check in -mem option

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
gzip-wrapper: Add support for different compression strategies with -Xstrategy

Last minute improvement before release.  Add support to allow users to
try different compression strategies with zlib, not just the
Z_DEFAULT_STRATEGY.

	  -Xstrategy strategy1,strategy2,...,strategyN
		Compress using strategy1,strategy2,...,strategyN in turn
		and choose the best compression.
		Available strategies: default, filtered, huffman_only,
		run_length_encoded and fixed

I originally didn't implement this because I considered it too esoteric
to waste scarce development time on.  What's the point in developing
something if no one is going to use it?

But, on reviewing open tickets on Sourceforge I discover someone asked
for this back in 2011, and I'd forgotten about it in the meantime.  It's a
nice feature and if it looks like it might be used ...

So, here it is, a day's "heavy" coding and a delay in the release.  But,
it's probably worth it.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>