Strips trailing whitespace w/out moving the cursor

Integrates a function that keeps track of the cursor position
Merge pull request #2 from neo/strip_whitespace

Strips trailing whitespace w/out moving the cursor