convert API docs to markdown

I've done this as two commits, the first just does a minimal addition of markdown tags to try and approximate the PDF docs.  The second shuffles a few things around to account for the lack of highlighting that the PDF had, adds some intra-page links, etc.

Fixes #5