console: Add support for println! and print!

Currently we have a cluncky way of printing by calling the following:

    writeln!(console, "My message")?;

Although this works, it means we need to keep track of the console
struct. This makes it difficult to support printing in third party
libraries. This also means that we don't follow the Rust convention of
supporting print! and println! macros.

This patch makes the console object a global static so that we can
support the print! and println! macros. All current users are converted
to use this new method.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
diff --git a/examples/button_subscribe.rs b/examples/button_subscribe.rs
index d06a0e9..8b2f17e 100644
--- a/examples/button_subscribe.rs
+++ b/examples/button_subscribe.rs
@@ -1,8 +1,8 @@
 #![no_std]
 
 use core::cell::Cell;
-use core::fmt::Write;
 use libtock::buttons::ButtonState;
+use libtock::println;
 use libtock::result::TockResult;
 use libtock::timer::Duration;
 
@@ -13,7 +13,7 @@
     let buttons_driver = drivers.buttons.init_driver()?;
     let mut timer_driver = drivers.timer.create_timer_driver();
     let timer_driver = timer_driver.activate()?;
-    let mut console = drivers.console.create_console();
+    drivers.console.create_console();
 
     let pressed_count = Cell::new(0usize);
     let released_count = Cell::new(0usize);
@@ -30,12 +30,11 @@
     }
 
     loop {
-        writeln!(
-            console,
+        println!(
             "pressed: {}, released: {}",
             pressed_count.get(),
             released_count.get()
-        )?;
+        );
         timer_driver.sleep(Duration::from_ms(500)).await?;
     }
 }