Move NULL_HANDLE & friends to q_common.h. Fix warnings by using
NULL_HANDLE instead of NULL.
Merge pull request #316 from archSeer/master

NULL_HANDLE & friends