Automatically use closeableResource() if possible.

If a type does not extends java.io.Closeable at compile time, but has a
close() method, the closeMethod() implicit conversion can be used to
do reflection-based invocation. However, at runtime, a newer version of
the class might extends Closeable after all. In that case, use the fully
type-safe version of AutoResource for Closeable which avoids the
overhead of reflective calls.
update build options to target 1.6 directly and add deprecation warnings