handle connect errors
generate session key each time. support multi-tab coexist
fix disconnectSync(), call it in onError
Merge pull request #23 from HenryHu/dev-v0.3.3

allow multi-tab coexistence, disconnect on error