Implemented double buffering of state in sequential loops (forLoop and whileLoop).
Merge branch 'master' into double-buffer
Updating tests after merging with master.
Minor polishing.
Some more polishing to address review comments.
Merge pull request #154 from kffaxen/double-buffer

Double buffer