stat: speedup statistics update

Remove 3 system calls per update call.
This should greatly speedup startup and somehow improve insert/remove
times.

TODO:
Actually statistics can be moved to separate thread effectively removing
statistics overhead in expense of lower resolution.
misc: move includes to the top to unhide include errors