Fix generated documentation

- Fix links to achors (lowercase and dash-separated)
- Render Properties and Events headers also for Widgets.md (remove
  obsolete condition)
- Sort events alphabetically as well
- Ensure newlines before headers

Change-Id: Ib13428b90441ec49964b863bb35959c3359bb6ca