Improve `PluginEnvironment` helper to support tapable's hooks
Improve `PluginEnvironment` helper to support tapable's hooks

Test cases use `PluginEnvironment` to monitor plugins' actions.
Before this change, it only mocked `.plugin()` which is not enough
to test plugins written using `Tapable#hooks`.

This implementation uses a `Proxy` to trap hook calls and log them
as events.

NekR/webpack,webpack/webpack,NekR/webpack,EliteScientist/webpack,SimenB/webpack,webpack/webpack,EliteScientist/webpack,SimenB/webpack,SimenB/webpack,webpack/webpack,SimenB/webpack,webpack/webpack