Update torndb.py

add transaction method,edit _ensure_connected method add ping check is_connect