New upstream cxxcam
Bind push, pop, and discard state.
Add basic test for state modification.