commitlog: add a counter for pending allocations
commitlog: add a counter for pending allocations

We track the amount of pending allocations but we don't really export
it. It will be crucial when we stop tracking pending writes.

This patch exports it through a method instead of the totals structure,
so we can easily change it. Current code probing pending_allocations
(the api code) is also converted to use the public method instead of the
totals struct.

Signed-off-by: Glauber Costa <7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>

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