python bindings: bug fixes and compatibility improvements

* compatibility with python 2.6
* fixed python 3 compatibility issues
* stop logging to stderr unconditionally
* enhancements to pylibmc wrapper:
  * support more behaviors
  * support integer and boolean data types with flags
  * return True/False for set operations when applicable
logging: format strings before passing to callbacks

CFFI doesn't support varargs callbacks at the moment so we need to format
the log messages before passing it to the callback.  This may be a bit less
efficient in some cases, but it generally makes sense as it means the
application doesn't have to support the same printf formats we require
internally.

Also fixed the context being passed to the callback, it's supposed to use
pass mc->log_context, not mc.

And finally, use log priorities from sys/syslog.h instead of 0 everywhere.