Fix integ tests
Two tweaks:
* `httpBackend.flush()` now returns a value, so we can't pass its result
straight into `done()`.
* In one of the megolm tests, we need to wait for the device query to finish
before marking the relevant device as known. One easy way to do this is
actually to try sending the message first - that will block until the device
query completes.