Fixed a bug in the library's destructor

...where mysqli_free_result would trigger a notice in your server's log
files if the result was not a mysqli result set (as it could also be a
boolean for queries that do not return anything or even unset when no
queries were run); thanks to Eike Broda!