cmTarget: Use null_ptr code path on all platforms

This reduces conversions asked of the compiler.  Also drop 'static' from
the declaration of the local null_ptr helper.
Merge topic 'cmTarget-null_ptr-everywhere' into next

32a191ce cmTarget: Use null_ptr code path on all platforms