Add support for ZSH

This commit refactors hook generation into its own class, and includes the
ZSH completion hook I wrote a few months ago for stecman/composer-bash-completion-plugin.
Reorganise order of methods in CompletionContext