Mock Comm objects and widget tests

We use mock comm objects to test the widget protocol on the python side.