Command hooks

Add support for pre- and post-command hooks that can be provided by `setup_package` modules (along with the other get_ functions they can provide.
    
The hooks should be variables in the setup_package module with names like `pre_<command_name>_hook`.  For example to implement a pre-build_ext hook there should be a pre_build_ext_hook defined in `setup_package`.

Every `setup_package` module can provide hooks, though their run order should not be relied in.  In other words, there is no way currently to ensure that hooks defined for the same command are run in a specific order.  One can also define a `post_<command_name>_hook`.
    
This also adds an optional srcdir option to register_commands so that it can be passed through to the `find_packages` call that `register_commands` now makes.

The `pre_<command_name>_hook` variable may either be a callable, or a string specifying the import path for some callable defined elsewhere.  The callable must take a single argument, which is the `Command` object for the command being hooked.  This provides access to all the command's options.

If this is implemented there should probably also be an update to the developer docs to mention this feature.  There might be some existing code that can make use of this feature as well, but I haven't looked in-depth yet.  I kept this separate from #110 for now, but once that PR is merged I will rebase this on top of it.
@embray: ``resolve_name`` isn't defined