Fix case where connection appears up but is down

Smack gets confused about connection state.  Detect with pings.