fix a bug for failed query
fix a bug for failed query

this would previously always set the ret.code to the curl response code, even
if the query failed. Maybe we want to switch to that in the future, but for
now we return -1 for invalid queries still.

mrtazz/restclient-cpp,embeddedmz/restclient-cpp,mrtazz/restclient-cpp,embeddedmz/restclient-cpp