Add specs for firstNonWhitespaceIndex and firstTrailingWhitespaceIndex
Preserve hasLeading/TrailingWhitespace when copying lines w/ invisibles

This fixes the styling of the leading whitespace of folded lines