Only call onopen after the connection has actually been opened

Firefox likes to do readystatechange events (0->2) when reconnecting fails but these attempts have status==0 (as opposed to 200) and should not trigger onopen.

Related to #15, fixes http://dev.vaadin.com/ticket/12492