Add verification of validity of QSGNodes.

QSGNodes can be created and deleted whenever an item wishes to do so,
without any notification. We catch most cases when that happens, but
we can never be totally sure about it. So this commit adds a
mechanism to ensure a node is valid, before accessing it (it's only
called one time when the user selects a node in the client, so no
performance critical code path).
The check is done by looking up if the QQuickItem still references to
the sg node in question.