Fix compiler error about callback lifetime

After upgrading to the latest Rust version, I got the following error
when trying to compile:

src/lib/callbacks.rs:31:5: 31:20 error: instantiating a type parameter with an incompatible type `~ErrorCallback<no-bounds>`, which does not fulfill `'static`
src/lib/callbacks.rs:31     local_data::get(error_callback_tls_key, (|data| {
                            ^~~~~~~~~~~~~~~
src/lib/callbacks.rs:39:5: 39:20 error: instantiating a type parameter with an incompatible type `~ErrorCallback<no-bounds>`, which does not fulfill `'static`
src/lib/callbacks.rs:39     local_data::set(error_callback_tls_key, callback as ~ErrorCallback);
                            ^~~~~~~~~~~~~~~
src/lib/callbacks.rs:45:5: 45:20 error: instantiating a type parameter with an incompatible type `~MonitorCallback<no-bounds>`, which does not fulfill `'static`
src/lib/callbacks.rs:45     local_data::get(monitor_callback_tls_key, (|data| {
                            ^~~~~~~~~~~~~~~
src/lib/callbacks.rs:53:5: 53:20 error: instantiating a type parameter with an incompatible type `~MonitorCallback<no-bounds>`, which does not fulfill `'static`
src/lib/callbacks.rs:53     local_data::set(monitor_callback_tls_key, callback as ~MonitorCallback);
                            ^~~~~~~~~~~~~~~
error: aborting due to 4 previous errors
make: *** [lib] Error 101

I've modified the definition of the callbacks, which fixed the error.
This also required changes to the examples, which didn't compile any
more after the change.
Use local_data_key! macro to define callbacks