python: Fix the module when used multiple times

In case we're using the python destination multiple times within a
syslog-ng config, it needs to be aware of threads and the GIL. This
patch teaches the destination to hold the GIL at appropriate times.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>