small refactor
Merge pull request #3494 from WalterBright/refactor-isNogc

small refactor
fix Issue 12622 - Purity, @safe not checked for pointers to functions