Add a NullHandler so logging warnings are not emitted if no logger is setup
Move raising MessagePublishException and handle python 2.6 version tuple