Ensure $httpBackend is flushed for Angular promise tests