Fixed onPing() method: replaced call to ping() with control() since
ping() should not be called to reply to a ping.
Fixed notification of Session's promise upon connect: it must be
notified only after we have successfully sent the preface bytes.