docs(api.md): start of API documentation

This will start the move of API documentation from the readme into a specific file in the new docs folder.  The readme will serve as a short "getting started" guide instead, with links to more specific docs.