Pull docs on defining magics out to customisation section
Fix some doc build warnings
Merge pull request #6425 from takluyver/docs-separate-defining-magics

Separate doc on defining magics