fix and cleanup doctests
This started as an attempt to integrate cargo test
with meson. That attempt failed miserably, and not just because cargo test
currently does not compile at all. In the meanwhile, here's a fix for the compilation failure and for other small things in the documentation.