Emit watch-pre-run event when before executing tasks

This is useful for changing config once all changed files are available instead
of accumulating them with the watch event.
Added tests for watch-pre-run event