export allocator counters
To simplify memory issues debugging, it will be nice to have a method to get counters from the allocator struct instance. It should be done on this package level because there is already a global mutex (allocMu) located here. Also added an expvar publish in case built with "memory.counters" so it will be possible to access stat via pprof, e.g. at "http://127.0.0.1:6060/debug/vars"
BTW, the overhead of calculating counters seems insignificant. Maybe you can make it always on?
Edited by Roman