sphinx: provide better sphinx compatibility
Move version navigation logic out of the HTML templates / inline javascript and into the configuration files and docs_meta.py