In QueryLoggingSolver call flush() on std::ofstream so that queries
get correctly logged if an assertion failure is hit later on.