Performance: flush PHP output buffers before DB logging

This change calls flush() before logging the ad impression. On my setup (Apache, with gzip compression off) this starts sending the output to the client while the logging is happening. This reduces the latency of the lg.php calls.

On OpenX 2.8 (where I first made the change) I got about a 20% reduction in latency with this change.