[ticket/10202] Add $this->db->sql_freeresult($result) to SELECT queries.

PHPBB3-10202