Add testing tool WaitForChange that exercises waitForChange and list.
Implement CardTerminals.waitForChange and list(State).
Back in sync with upstream