Fix up dependency finding for libg{mock,test}_main
- Look up the corresponding non-*_main libraries via LDFLAGS using the directories provided in src.libnames.mk. This will allow the libraries to be built in the "make libraries" phase of buildworld.
- gtest_main relies on gtest, but didn't explicitly call out the dependency in LIBADD. Fill in this missing blank.