Refactor diff editor widget, fix whitespaces handling

Prepare for ignoreNewLine handling

Task-number: QTCREATORBUG-11002

Change-Id: I97fc0887ef27c821252283ccbad655ac0bc79f0a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>