EntityScanner/Batch should implement Closeable/Flushable

See https://issues.cloudera.org/browse/CDK-136