Add a mode to docgen to run the code samples in the documentation.

This alleviates copying them elsewhere to ensure they are not broken.
Merge pull request #2078 from abergeron/doc

Add a mode to docgen to run the code samples in the documentation.