Add a function to strip trailing whitespaces automatically.

It is the same function that can be found at vimcasts.org. Remove all annoying trailing
whitespaces automatically.