NCBC-635: Provide better failure support for N1QL Query API

Change-Id: I16d9a44ba653f8846b22e7c679681ab262e1e6bc
Reviewed-on: http://review.couchbase.org/41351
Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>