database: reorder initialization
database: reorder initialization

In a preparation move for the LSA throttler, we have reordered the
initialization fields in database.hh so that the sizes of the regions are
computed before the initialization of the region.

However, that seemingly innocent move broke one of our tests. The reason behind
that, is that if we don't destroy the column families before destroying the
region, we may end up with a use after free in the memtable destructor - that
itself expects to call into the region.

This patch reorders the initialization so that the CF list still comes after the
dirty regions (therefore being destroyed first), while maintaining the relative
ordering between size / region that we needed in the first place.

Signed-off-by: Glauber Costa <7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>
Message-Id: <0669984b5bccdb2c950f2444bdee4427abad56ba.1463508884.git.7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>

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