Test case for Redmine 6589.

Trying to delete a region where a specific select_end doesn't match
should be noop.

This is different from insert_lines, which appends the line at the
end if there is no match for select_end (see existing test case
10_files/09_insert_lines/302.cf). While it would be best to make
this behavior consistent, I'm opting for not rocking the boat and
keep existing behavior of insert_lines in place.
Abort delete_lines promise if select_end doesn't match

If the policy specifies a select_end, then it expects
a 100% match of a region before deleting any lines. If
the region is only partially matched, abort.

To match a region until the end of the file, the policy
can omit select_end, as documented.

Fixes Redmine 6589
Refactoring and cleanup.

Since all callers of SelectRegion handle a false return value
by calling cfPS with INTERRUPTED and setting the promise result
accordingly, we can omit the duplication inside of SelectRegion.

Instead, use Log for verbose messages.
Refactoring and cleanup.

Purge CF_UNDEFINED_ITEM from this code. Null pointers are as
undefined as it gets.

Admitting to some inconsistency when testing for NULL (!prev vs
prev == NULL), but somewhat pre-existing condition and I tried to
keep it readable.
Merge pull request #2002 from vohi/redmine/6589

Redmine/6589