extendRangeByLines

Expands a DocumentRange by a number of full lines before and after. Returns a new range clamped to the content bounds.