vstat: Introduce locking, preparing for timer

Next step: Periodic POST of stats.