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