Convert examples to doctests in stdlib docs

The standard library documentation contains many examples which can be processed as doctests. This PR does so.

Also includes formatting fixes:
- correctly wrap code references in double backquote environments
- Better cross-referencing of functions

Additionally, include some content fixes:

- A better description of gcdx
- Also includes odd/even docfix of 1465486