Fix NegativeArraySizeException occuring in clearArea()
Fix "resize" command, by restricting cursor X position to actual width
Fix NPE when pasting in a closed remote terminal
Fix panelToCharCoords returning negative column on left side
Fix selection issues

- When selecting from right to left, it was not possible to select first
  character of the line
- When quickly moving the mouse, first selection character(s) were
  missed
- Fixing "Attempt to get line out of bounds: -1 < 0" when selecting
  upper than scrollbuffer
Fix cursor drawing in selection

- contains() was wrong if (p.first.y == p.second.y && x > p.second.x)
- cursor was not visible in "inverse selection" mode, when in selection
Merge pull request #52 from Plonk42/bug_fix

Various bugs fix