Modified the order of API docs page so that table of contents is always at the top

Addresses #880