Serialize state list during stat computation
When computing multiple sets of state-level statistics, there is no guarantee that IDs will be assigned to states consistently. Solve this problem by serializing the state list, so IDs are automatically propagated to following runs.
CAVEAT: I will probably do this by pickling the list, which is brittle and only suitable for short-term data caching on a single machine.