Convert legacy tab indentation to spaces and remove trailing whitespace from all lines