Flush UI message loop before quitting

Cookies were not flushed on application exit because objects deleted
lazy on the UI-thread never had their destructors called because we
did not flush the queue on exit.

Change-Id: If53cdb5547e15a9f39de8b99b1da313e307b1c90
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>