Improved the performance of Document.cursor_position_col/current_line_before_cursor/current_line_after_cursor.
Improved the performance of Document.cursor_position_col/current_line_before_cursor/current_line_after_cursor.

melund/python-prompt-toolkit,jonathanslenders/python-prompt-toolkit