Improve hooks documentation structure
Improve hooks documentation structure

Split synchronous and asyncronous hooks into separate sections, and move
the duplicated paragraphs about syncronous hook behavior into the top
of the syncronous hooks section.

Replace legacy section heading formatting (===== and ----- forms), which
only supports 2 levels, with newer formatting (starting the line with one
or more # marks) which supports further levels.

Add a table of contents.

Change-Id: Iacf7c44860ec4d77e44c9816fc04ea641a2c8b43

GerritCodeReview/plugins_hooks