Stats recording - create a background worker to save stats

* Convert Stats to GenServer
* Use cast instead of call for termination from worker to manager