Add a function to strip trailing whitespaces automatically.

Same function in the vimcasts.org. Remove all annoying trailing
whitespaces automatically.