Add basic ATF tests for Capability mode .. lookups
A follow-up to r309887.
Several tests copied verbatim from
https://github.com/emaste/snippets/blob/master/test_openat.c .
Reviewed by: kib@, ngie@ (earlier version)
X-MFC-With: r309887
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8748