Fix races in tests when running under valgrind or travis

Disable some code which currently races due to multi-threading,
and the expected order of messages. Should be re-enabled later
when we're no longer threaded in cockpit-ws.

Closes #544
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>