fix deadlock in stats handler; add reverse DNS lookup for tunnels