Do not print anymore, use the logging module instead. Do not print anymore for connecting/disconnecting/querying in case of update_offset
removed some mysql stuff occurences in comments and var names
fix malformed postgresql query when {first,last}_known_offset is NULL