Fixed issue with false conflicts being signaled when both branches had made exactly the same change

Fixes #507

Includes some code cleaning
Merge pull request #508 from volaya/rebase_equal_changes

Fixed issue with false conflicts being signaled when both branches had made exactly the same change