Add function to setup trim trailing whitespace functionality

This adds the missing trim trailing whitespace functionality using delete-traling-whitespace function available since Emacs 21.