[wayland][bridge] Use internal mutability for event counter.

In an upcoming change I'll be iterating over a set of object IDs in the
Client and emitting input events for each. In that context I'll need to
either clone the set of id's I'm interating over, or remove the
requirement to have a mutable Client reference to increment the counter.

I initially factored this into a clone-able `EventCounter` struct that
wrapped an Rc<Cell<u32>>, but that overhead seems unnecessary so I just
inlined the Cell directly into the Client.

Test: CQ
Change-Id: I75308ab215bde3d3392285d503844cd47fb9c17c
diff --git a/bin/wayland/bridge/src/client.rs b/bin/wayland/bridge/src/client.rs
index 91828eb..52a27fd 100644
--- a/bin/wayland/bridge/src/client.rs
+++ b/bin/wayland/bridge/src/client.rs
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 use std::any::Any;
+use std::cell::Cell;
 use std::sync::Arc;
 
 use failure::Error;
@@ -44,7 +45,7 @@
     task_queue: TaskQueue,
 
     /// A monotonically increasing value that can be embedded in certain events.
-    next_event_serial: u32,
+    next_event_serial: Cell<u32>,
 
     protocol_logging: bool,
 }
@@ -59,15 +60,15 @@
             objects: ObjectMap::new(),
             tasks: receiver,
             task_queue: TaskQueue(sender),
-            next_event_serial: 0,
+            next_event_serial: Cell::new(0),
             protocol_logging: false,
         }
     }
 
     #[allow(dead_code)]
-    pub fn next_event_serial(&mut self) -> u32 {
-        let serial = self.next_event_serial;
-        self.next_event_serial += 1;
+    pub fn next_event_serial(&self) -> u32 {
+        let serial = self.next_event_serial.get();
+        self.next_event_serial.set(serial + 1);
         serial
     }