AC_CHECK_LIB requires a second argument, a function to test for.
Simplify the autoconf that checks for bzip2 headers/libraries.

Pull the header/library checks outside of the existing AC_MSG_XX
conditionals, otherwise the autoconf output gets messy.

Add matching checks for the snappy headers/libraries.
whitespace cleanup