CMake: Added a check for libjpeg when compiling with HDF4 support.
CMake: Added option to run HDF4 file tests, as well as a check for ‘wget’; without wget, these tests cannot be run.
Cleaned up configure.ac a little bit, added a check for libjpeg when compiling with hdf4 support.