Adds elgg_entity_gatekeeper()

* DRY up entity handling
* Improved error messages for users accessing restricted content 
* namespaces the gatekeeper functions (optional aliases so as not to force developers to update current plugins)