Pass the EventLoopRuntime by value

Now that the EventLoopRuntime simply wraps a &CppEventLoopRuntime,
we can make give the spawned task an owned EventLoopRuntime. This means
that the spawned future can now own and use the EventLoopRuntime within it.
This is safe because as long as the EventLoop exists, so does the
CppEventLoopRuntime.

Change-Id: Iccaa6373fdb9d61a7995758f7b99906275f18c99
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/events/ping.rs b/aos/events/ping.rs
index e85ae06..d9673fa 100644
--- a/aos/events/ping.rs
+++ b/aos/events/ping.rs
@@ -28,7 +28,7 @@
     let ping = PingTask::new();
     ShmEventLoop::new(&config).run_with(|runtime| {
         runtime.set_realtime_priority(5);
-        runtime.spawn(ping.tasks(runtime, app.sleep));
+        runtime.spawn(ping.tasks(*runtime, app.sleep));
     });
 }
 
@@ -45,8 +45,8 @@
     }
 
     /// Returns a future with all the tasks for the ping process
-    pub async fn tasks(&self, event_loop: &EventLoopRuntime<'_>, sleep: u64) -> Never {
-        futures::join!(self.ping(event_loop, sleep), self.handle_pong(event_loop));
+    pub async fn tasks(&self, event_loop: EventLoopRuntime<'_>, sleep: u64) -> Never {
+        futures::join!(self.ping(&event_loop, sleep), self.handle_pong(&event_loop));
         unreachable!("Let's hope `never_type` gets stabilized soon :)");
     }