[ticket/12387] Cleanup *_free_result call and remove @ on that call

https://tracker.phpbb.com/browse/PHPBB3-12387

PHPBB3-12387
Can query_id be integer 0 on any DBMS?