Stop linking pthread.

It was only needed by gtest, which is no longer used.
(Intesting note: I checked when the -lpthread flag was added, and it's
been around since the first revision of build.ninja, which used to be
checked in before configure.py existed. Back then, it looks like '@' was
used to dereference built-in variables, and build outputs were also
prefixed by '@'!).
This code could probably use some functions to limit the scopes of variables.  I considered it when I was doing the bootstrap refactor and then realized it wouldn't necessarily improve anything.  How did this script get so looooonnggggg... :)