Support DDL and empty select statements in SQL stats collection.

At the moment, any code performing one a DDL (create, alter, drop table)
and/or any code doing tableless selects (like SELECT 1; or SELECT
MASTER_LOG_POS...) will cause HHVM to issue a warning and not update the
statistics.

This patch should add support for those. Closes #3760