Add register_first/register_last in hooks module

Makes it possible to register hooks that you want called
before/after other hooks.
Refactor check_for_200_error to use register_first

No function change, this refactoring uses the new
register_first() method to ensure that we will always
be called before the general retry handlers.
Fixed version of unittest2 for travis
Merge pull request #368 from kyleknap/hook-register

Revamped register_first()/ _last()