Fix OOIION-897. Made process state greenlet safe by using a lock
Fix OOIION-806: State now reloads on process restart, not only system reboot
Enabled state repository to subsequently update state without reading first
Stateful processes keep a copy of the prior ProcessState to avoid a read on put_state