Add a constructor override for initWithLogsDirectory.

This is so that callers using that constructor from
DDLogFileManagerDefault don't bypass the code in
CompressingLogFileManager.init.
Replace use of NSThread.detachNewThreadSelector.

Replace use of NSThread.detachNewThreadSelector with a GCD dispatch
at DISPATCH_QUEUE_PRIORITY_BACKGROUND.

This means that the thread that's doing the compression is I/O throttled,
so it should stay out of the way of the rest of the app.

This could be important at start of day or resume from background,
because it will try and compress all the uncompressed log files it finds
in one go, and if the screen keeps getting locked before we have a
chance to complete then this can end up being a large number of files.
Add explicit casts for integer conversion.

Add explicit casts from NSUinteger to uInt for the assignments into
z_stream_s.  These types are different on 64-bit builds, and this
causes a warning in Xcode 5.1 with -Wshorten-64-to-32.
Merge pull request #252 from tipbit/CompressingLogFileManager-initWithLogsDirectory

Add a constructor override for initWithLogsDirectory.
Merge pull request #253 from tipbit/CompressingLogFileManager-explicit-cast

Add explicit casts for integer conversion.
Check and log some errors.

Log the streamError whenever we fail to write during compression,
and log any failures when removing the original file or cleaning up
the temporary file after compression failed.
Fix a rare crash caused by an unchecked return value.

Fix a rare crash in CompressingLogFileManager caused by an
unchecked result from read.  If the read fails, it returns -1.
This was then added to inputDataSize, which in turn is added to
inputRemaining further down the function, and used as an input
to memmove (and is unsigned to boot, so it'll be very large rather than
negative).  This means that the memmove stomps all over memory,
and we crash not long afterwards (often when an autorelease pool is
freed).

This crash is rare because it depends on the read call failing.

Fix this by checking the return value from NSStream.read, and leaving
the loop immediately if there's an error.
Merge pull request #250 from tipbit/CompressingLogFileManager-log-stream-error

Check and log some errors.
Merge pull request #251 from tipbit/CompressingLogFileManager-background-queue

Replace use of NSThread.detachNewThreadSelector.
Merge pull request #255 from tipbit/CompressingLogFileManager-check-read-return

Fix a rare crash caused by an unchecked return value.