Fix mysqli_query return value for query without result

But you can see at https://github.com/facebook/hhvm/blob/master/hphp/runtime/ext/mysql/ext_mysqli.php#L559 that the logic is to simply check the return code of hh_real_query and to call store_result or use_result if it's OK_FETCH_RESULT (2).
This seems consistent with the doc and with the code from php itself.
The same logic can be found at 
https://github.com/facebook/hhvm/blob/master/hphp/runtime/ext/mysql/mysql_common.cpp#L1480 which seems to handle the possibility that php_mysql_do_query() returns OK, and in this case doesn't call  php_mysql_get_result().
It seems to me that the check inside php_mysql_get_result() you referred to, is used when the public functions mysqli_store_result() or mysql_use_result() are called directly.
Please note that mysqli.store-result() returns false when there is no result ( see #2799 and http://php.net/manual/en/mysqli.store-result.php ). Before #2799 the behavior of mysqli_query was ok and followed your logic.