corrected issues for detecting deleted lines

code needed to consider if the selection start and end positions were
at the beginning or end of the line they are at

selection class modified to return status of whether the start and end
selection positions are at the begin or end of the line, replaced
lines() function with newLines(), so if the selection is contained on
a single line, the number of new lines in the selection is zero; also
added comments to the selection class functions