Merge "Pushing state persistence to a background thread" into jb-mr1.1-dev