Fixed #23750 -- Allowed core.checks.register to be used as a function
Made changes asked in review

- reorganized tests
- fixed style problems in doc and code
- added a mention in the 1.8 release notes