define NULL as nullptr when used in C++11 or later

This should be safer for casting and more compatible with existing code
bases that wrongly assume it must be defined as a pointer.
8 files changed