KT-4568 DeMorgan Intentions Fix

This is a fix for the DeMorgan conversion intentions for the bug pointed out by udalov over on [#409](https://github.com/JetBrains/kotlin/pull/409). I've introduced two new test cases to cover the problem and heavily refactored the code to make better use of higher level functions such as list.map() and list.fold(). I believe the same problem affects the ConvertNegatedBooleanSequence intention as well so I'll be pushing another commit to fix this shortly.