add setting to determine if java format removes tailing whitespace or not

fixes #346