gatekeeper: Move everything to libgatekeeper and add test case
libgatekeeper: make test fail