Let custom typecasters access global state. Fixes #395
Fix formatting and nomenclature
Update docs
Merge pull request #396 from gratipay/issue395

Let custom typecasters access global state. Fixes #395