Don't set m_first_query in statements that only retrieve from tmp tables
Don't set first query on queries that don't add data if there's no data

Some queries like `select_ways` will only add data to the tmp tables if
there is already data in them. Running these queries if there is no data
in the tmp tables has no effect and will always have no effect.
Rename m_first_query to m_tables_empty, a more accurate description
Merge pull request #73 from pnorman/not_first

Only set m_first_query on queries that could put initial data in the tables