Improve middle mouse paste on Linux

* Moves the cursor to the clicked location
* Ensures operations like backspace don't write to the selection clipboard

Closes #4296
Closes #4638
Closes #4677