database: fix direct flushes of non-durable column families.
database: fix direct flushes of non-durable column families.

If a Column Family is non-durable, then its flushes will never create a
memtable flush reader. Our current flush logic depends on that being
created and destroyed to release the semaphore permits on the flush.

We will remove the permits ourselves it there is an exception, but not
under normal circumnstances. Given this issue, however, it would be more
adequate to always try to remove the permits after we flush. If the
permits were already removed by the flush reader, then this test will
just see that the permit is not in the map and return. But if it is
still there, then it is removed.

Signed-off-by: Glauber Costa <7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>
Message-Id: <049334c3b4bef620af2c7c045e6c84347dcf9013.1479498026.git.7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>

avikivity/scylla,scylladb/scylla,avikivity/scylla,raphaelsc/scylla,avikivity/scylla,scylladb/scylla,raphaelsc/scylla,scylladb/scylla,duarten/scylla,duarten/scylla,scylladb/scylla,duarten/scylla,raphaelsc/scylla