[SPARK-4079] [CORE] Default to LZF if Snappy not available

By default, snappy is the compression codec used. If Snappy is not available, Spark currently throws a stack trace. Now Spark falls back to LZF if Snappy is not available on the cluster and logs a warning message.

The only exception is if the user has explicitly set spark.io.compression.codec=snappy. In this case, if snappy is not available, an IllegalArgumentException is thrown.

Because of the way the Snappy library uses static initialization, it was very difficult in a unit test to simulate Snappy not being available. The only way I could think of was to create multiple classloaders which seemed excessive. As a result, most of this was tested adhoc on a test cluster by modifying the system property: org.xerial.snappy.use.systemlib=true which caused Snappy to not load and thus triggering this logic.
So, I know I suggested this, but I think this doesn't do the same thing as the PR description says.

If the config option exists and the requested codec is not available, this will always try the default codecs. Instead, this should probably be something like:

    if (conf.contains(configKey)) {
       createCodec(...).getOrElse(throw new Blah("requested codec cannot be loaded"))
    } else
       createCodec(DEFAULT).orElse(createCodec(FALLBACK)).getOrElse(throw new Blah("cannot load defaults"))
    }