Stability improvements

Objectory works in Safari (desktop+mobile) once again.

The BSON bytes are JSON encoded/decoded.

In the future we may want to add checks if the browser supports binary WS and if so, do that.

Added a few safety measurements (error handling).