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...
Made static methods in TextCigarCodec and BinaryCigarCodec