Bugfix: check workspace num for json null

In conn::get_workspaces(), check the "num" property of a workspace
object reply for null. In this case, set num to -1.

Without this check, when "num" is null, other properties on the
workspace reply object will not be set correctly.