cleanup whitespace

* remove all trailing whitespace
* if file is based on tabs, use tabs
* otherwise keep and use spaces
* if indent level too deep -> convert to two spaces