moved gatekeepers into page handling library
namespaced the gatekeeper functions (but made it optional)
Fixes #2814 adds elgg_entity_gatekeeper()
improved the flow of the logic
Merge pull request #5791 from cash/gatekeepers

Adds elgg_entity_gatekeeper()