Statistics implementation via hooks

Allows implementing handlers to override the default statistics
behavior, if necessary.
Custom statistics hook for unresolved paths

Instead of reporting these as "completed", we can report them as
"redirected" or "unresolved" (as appropriate).