SERVER-9716 cppclient: dbclientcursor validation

There are multiple instances of the dbclientcursor pointer in cpp client driver which has not been checked for the validity of the pointer before usage.

The patches fix these instances with a validity check before the usage.
The associated JIRA is https://jira.mongodb.org/browse/SERVER-9716