Trunk devguide update

I cherry-picked all of our changes through chapter 05 - hooks. I committed formatting changes necessary to render various code examples and fix some of the markdown. I've merged master into it, so it should auto-merge into trunk.

Thanks guys!

@rbohl