p11-kit: Use pthread_atfork() in a safe manner

Instead of trying to perform actions in pthread_atfork() which
are not async-signal-safe, just increment a counter so we can
later tell if the process has forked.

Note this does not make it safe to mix threads and forking without
immediately execing. This is a far broader problem that p11-kit,
however we now do the right thing when fork+exec is used from a
thread.

https://bugs.freedesktop.org/show_bug.cgi?id=84567
Release version 0.22.0
makefile: Rename DATADIR to not conflict with Win32 define

Signed-off-by: Michael Cronenworth <mike@cchtml.com>