Switch hash-based hook system to use before:create, after:save style syntax

Update style of additions to match vdemedes's. Refactor tests to use new syntax. Remove extraneous code.
Replace for..in loop with Object.keys and forEach.