API: system hooks API functions and documentation updated

* updated system hooks documentation and code comments
* fixed access to system hooks if no user given resulting in a `500 Server Error`
* added tests
Merge branch 'master' into api/system_hooks_adjustments
Merge pull request #3170 from Asquera/api/system_hooks_adjustments

API: system hook request functions and documentation updated