misc: move includes to the top to unhide include errors
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.
blob: switched to adaptive mutexes when available