Remove trailing whitespace

Our CONTRIBUTING.MD says to check for unnecessary whitespace using `git
diff --check`, but we've gotten lax in checking this. This commit
removes unnecessary trailing whitespace from lib. It ignores the CRNL
line endings in the vendored rgen code.