[doc,library] Improve finalization docs.

* Correct section heading levels.
* Improve linking.
* Add a local TOC.