Added the beforePath hook

- Changed where the path segments get converted to URL encoded strings. Now it
  happens after the beforePath hook so any non-string values added into the path
  by that hook are handled in the same way as all other path segment values. This
  also had the effect of consolidating similar logic from several places into one
  location. Yay! Refactoring!

- Added a Hooks Quick Reference table for easy lookup of common hook info.