Trim trailing spaces and convert tabs to spaces.
Merge pull request #2122 from XhmikosR/whitespace