strip trailing whitespace

(copied + adapted from
https://github.com/Casecommons/vim-config/blob/master/init/language.vim)