Fixed race condition where synchronouslyClose() would be called multiple times if AbstractAsyncWriter.close() called twice simultaneously
Closeable requires idempotentency: now only writing BAM index once when closing
Merge pull request #144 from samtools/closeable

Fixed race condition where synchronouslyClose() would be called multiple...
Issue 142 - isCRAMFile moved to SamStreams. Use readBytes instead of dis readFully