Revert "Revert "Merge branch 'pr/n1420_torarvid'""

This reverts commit cb01676fb6f79a18fd18fcd4e1ce1de23260b3b4.
Always reset to black after changing some text color

If the cursor was placed at some section where the text color was already
set to red, and something triggered this method, we could in some situations
end up with a situation where the cursor moved to a new line, and *all* text
became red after that point.

This was not desired, and this method simply changes the behaviour so that
after a color change, the color at the cursor position will be set to black.
Fix limit bug in ChangeTextColor that might cause crashes

In some situations, TextBox.GetFirstCharIndexFromLine will return -1. If the
method was then called with offset=0 as well, it would cause a crash.

This simple change ensures that the value we assign to SelectionStart is
always >= 0.
Improve how EditNetSpell.EnsureEmptyLine works

First of all, there is no need to do anything at all unless someone tries to
type anything on that line-that-should-be-empty.

Secondly, when someone types something at the second line, we want to
prepend whatever-that-was with a newline. So we insert the newline (and
optionally, the bullet) at the *beginning* of the line. Then we place the
cursor after the newline and whatever-the-user-typed.
Add methods Line and ReplaceLine to the EditNetSpell class

We will need these two methods when we soon replace the word-wrapping logic.
Move word-wrapping logic to new class WordWrapper

This class has quite simple logic for wrapping text at a fixed limit. It
does this by the standard greedy algorithm where you keep adding words as
long as that doesn't cause the line to be longer than the limit.

There is an exception to that rule, and that is if someone were to enter a
single word on a line.. Then we will accept it no matter what the limit is.

This patch also separates the wrapping logic from the EditNetSpell control,
which seems like a good idea to me.
Simple refactoring in FormCommit.FormatLine

The ColorTextAsNecessary can compute the line length itself. No need to do
this in FormatLine, since it does not use it for anything.

Also, the logic for line==0 in FormatLine is now simplified to just call the
ColorTextAsNecessary method.
Add FormCommit flags so we know when formatting is complete

The FormatAllText could in some cases be called in an infinite loop. Now
this should no longer be possible. We set a flag whenever some of the child
methods changes any text. It recursively calls itself until no changes are
made to the text.
Fire OnTextChanged before checking whether dictionary is set
Color too long lines that couldn't be wrapped.
Format pasted text
Reduce flashing to last character only.
Corrected computing length (https://github.com/gitextensions/gitextensions/commit/a5b24efb32559c0bd32fc7a0f9f48e36d55865f9#commitcomment-2565602)
Small undo improvment
Color selection only when curent color has changed
Move auto-wrap checkbox to CommitTemplateSettings form
Merge branch 'pr/n1594_torarvid'
Merge remote-tracking branch 'origin/pr/n1592_torarvid'
Fixed save and load CommitValidationAutoWrap