stat: Json statistics. React C bindings.

- React usage refactored, now it's used through it's C bindings
- Full json statistics can be exported now
- want_defrag statistics field added
- some C files fixed to compile with CPP