add optional 'before_invoke' parameter to WP_CLI::add_command()

this avoids repeating the command name and makes it clearer when the
callback is fired
Merge pull request #536 from wp-cli/before_invoke

Add optional 'before_invoke' parameter to WP_CLI::add_command()