Fixed various TextEdit and TextBox UI bugs

- Word wrap now works correctly for words bigger than the width of the
input area (eg. random mashed keys)
- Fixed crashes involving copy and paste, pressing backspace when at the
start of the string
- Made delete remove the character in front like it should
- Fixed cursor position for various newline breaks (mostly word wrap).
There's still one weird case it messes up on that I haven't tracked
down.
- There is no longer an annoying space at the end of all text input.