Use ThreadLocal for withConnection (#26)