Major refactor of the docs, phase 1

Move to use the astropy affiliated package template for the docs,
started on a proper api doc using astropy and fixed some docstrings
add back in other doc pages
one warning in guide and other tweaks
re-add examples
add auto templates
more database guide
Merge pull request #695 from Cadair/doc_sprint

Prep for the Documentation Sprint