Cleanup whitespaces

Our coding conventions ask for TAB indents (corresponding to tabs
which are 4 characters wide), and no trailing whitespace. Some code
diverged from that over time.