Flush the application X connection in glXSwapBuffers

Otherwise there may be no other activity on the connection and application
requests such as resize may be never flushed out.  Fixes CoherentUI
Factor out Profiler::get_timestamp
Remove Profiler::nstates
Report sizes in perf output