Refactor

Shuffled the error context code in examples around a bit to make it a
bit clearer.
Rename callbacks
Use local_data_key! macro to define callbacks
Changed build to make it work in my own project.

I need to link it statically and I don't really see a way to do it
without hacking the way it's built.