Removing duplicate code from doc/*.dox and using \snippet to load code from examples.