More documentation work.

Added documentation to "flag" extensions, which is written above each flag in ContextCapabilities. Also added dependencies documentation and when an extension has been promoted to the core.
Converted all templates from functions to package fields, so that they can more easily be referenced (with compile-time safety).