Port a few helper from OMOP branch

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Added #invokeOn:with: and #hasGlobal: primitives

- backport from OMOP branch

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Improved comment

Signed-off-by: Stefan Marr <git@stefan-marr.de>