Improve detection missing WhatIf support

This PR replaces https://github.com/opscode/chef/pull/2225
```
From output of Whatif-run, do not replace line break by space, as this breaks the match if the break was done within a word.
```
I've done a little refactoring in order to write tests.