Fix linking static test binaries with atf.test.mk

Check for -static in LDFLAGS or LDFLAGS.<test>, then pass in the appropriate
dependency (LIBATF or LDATF)

This unbreaks the build with some of the NetBSD tests that need to be compiled
statically

Reviewed by: imp, jmmv
Phabric: D991
Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f