* Searching of first parental PSI elements before/after new line
correctly stops at the start/end of file. As result it's possible now
to surround element at the first/last line in the file.
Also corresponding traversal does not try to climb above PSI file.
* Even single character can be selected in first place.
* In languages that uses indentation to delimit blocks (like Python)
several consequent sibling statements can be surrounded even if the last
of them is at the end of its parent.
Python does not have special terminal symbols to indicate start/end of
the block. Because of that current approach for searching boundaries for
custom folding region may result in that one of elements "felt of the
cliff" of statement list and is too far above. E.g. in sample given by
user for the last method these elements are PyFunction and PyClass.
However if exactly one element was selected by user and both elements
ends at the same offset it's safe to pick the nested one.