Move OTSYS_TIME() to tools.h

This commit also removes all trailing whitespace from the source files.