Don't validate skipped prompts

Fix mockPrompt so that `validate` is not called when `when` returns false. This makes the mocked behaviour consistent with Inquirer.js and prevents test failures caused by `validate` functions not expecting an undefined value.

Close #600