Fix compiler error about callback lifetime

Closes #118
Merge pull request #119 from bjz/lifetime-error

Fix compiler error about callback lifetime
Remove the channel from Window and place it into EventReceiver.
Merge pull request #117 from csherratt/event_object

Remove the channel from Window and place it into EventReceiver.
Remove ~[T] usages
Use new attribute syntax
Use a channel instead of a trait object for handling errors
Update examples
Merge pull request #121 from bjz/error-callback

Use a channel instead of a trait object for handling errors
Enforce thread safety at the type level

Closes #97
Update examples
Improve documentation.
Merge pull request #122 from bjz/thread-safety

Enforce thread safety at the type level
Add `flush_messages` function and remove `EventReceiver` type

This simplifies the API and makes message flushing more generic.
Update examples
Add a `ShowAliases` struct for formatting

This allows the client to specify if they want to format the type using the aliases rather than the default variant names.
Update examples
Merge pull request #125 from bjz/show-aliases

Add a `ShowAliases` struct for formatting
Merge pull request #124 from bjz/flush-iterator

Add `flush_messages` function and remove `EventReceiver` type
Return the error receiver when `init` is called

We also remove the timestamp for errors. This is because calling glfwGetTime before glfwInit was called will cause an error. This would cause the error callback to be called infinitely.