cleanup, typos, warnings
[merge] refactoring: use structure instead of array indices

* MergeFragment: hold TextRanges in named fields instead of operating an array via indices 0, 1, 2.
* cleanup, set @NotNull/@Nullable, fix code style.
[merge] cleanup

* Remove the deprecated constant.
* Logically reorder fields.
* Convert for-with-index to Iterator.
[merge] cleanup

Remove the Parent interface, because it looks like an overhead.
Just pass the Project instance to clients.
[merge] refactor: change array & indices to structure

* MergeList.myChanges[]
* MergeConflict.myChanges[]
* cleanup, code style, javadoc, @NotNull/Nullable
Extract MergeFragment to a separate class.

It is used in several places and is rather big.
Added some javadocs.
[merge] refactoring: make FragmentSide to be enum

* Make some DRY.
* Use IllegalArgumentException to a not-public InvalidParameterException
[merge] refactoring: move inner classes outside, move some methods, cleanup, code style

* Move Change.HighlighterHolder and Change.Side inner classes to outside since they are used a lot from the ouside of the Change class.
* Move ChangeType.apply() to Change, because it is nothing to do with the ChangeType: it is the Change which is being applied.
* Add some javadocs.
* Cleanup.
[merge] Display applied changes; allow applying both sides of a conflict.

OVERVIEW:
Don't hide highlighting markers on "apply", as it is done on "ignore".
Instead use a lighter highlighting: remove the background and paint a separator with a color of change type (red for conflict, green for insert, etc.).
Show, what has been changed, i.e. highlight both original side and the applied change in the base/result side.

For conflicting changes, on apply neither remove nor apply the second "variant" of the conflict. Instead propose to apply (or ignore) the second variant below the first one.
This fixes IDEA-36811 "Add ability to merge in lines from both left and right in three way merge".

DETAILS:
* Define Change#onApplied handled differently:
   - for the SimpleChange update highlighting & remove apply/ignore actions & update the ChangeList
   - for the ConflictChange additionally break the connection between left-to-base and right-to-base changes via the MergeConflict by nullifying the non-applied change in one case and defining its own MergeConflict for this non-applied change.
   - Update MergeConflict and MergeList to be aware of nullable changes in semi-applied MergeConflict.
* Make ChangeType and TextDiffType modifiable: each one can be applied.
   - TextDiffType returns different background for applied changes (no background actually).
   - ChangeType displays different line separator for applied changes.
* Manage ChangeList#myAppliedChanges collection of the changes which has been applied.
   Pass both myChanges (not applied yet) and myAppliedChanges in getLineBlocks(), but make LineBlocks be aware of not-sorted Changes collection.
* Make LineBlocks depend on TextDiffType rather than on TextDiffTypeEnum to get correct coloring attribute for applied changes.
* Some javadocs, cleanups and code style fixes.

KNOWN PROBLEMS:
* Applied deletion is not easy to find, because it occupies zero place in both original and resulting side.
* "Ignore" works differently from "apply" in that way that highlighting is completely removed for "ignore" (as it were): not sure if it should be fixed or that corresponds to the nature of "ignore" action name.
* Trapezium-dividers are the same for applied changes as for non-applied. Will be changed.
Merge branch 'merge_tool_improving'
notnull
cleanup
notnull
Merge remote-tracking branch 'origin/master'