Added tests for the TTD emulator.
Bugfix: token-switching means a demand may get a response with a different token.
Added remaining built-in binary operators in the TTD emulator.