tree: pull in lightly modified sys/tree.h implementation

The upcoming tracker will need this implementation on systems
that don't support it. Also, the implementation can use macros
as compare functions. Taken from OpenBSD.
make: rename makefile.mk to makefile.inc

Fix GNU subdir foo while at it...