LOK: do clean main thread shutdown cleanly.

Change-Id: If44971f67a489f6b50dee6c1683707c47e695de4
Use CPPUNIT_ASSERT instead of assert.

Change-Id: I24e7934002ebdde208db74ae3308b26875a3155b
Prevent LOK DocView crash if document too large.

There seems to be a maximum size that gdk's pixbuf
can handle, however I have been unable to find any
documentatation. Seeing as the current implementation
isn't realistically useable anyway, we might as well
set a hard limit here (in practice we'd have much smaller
tiles + compositing).

Specifically extras/source/shellnew/soffice.ods will fail
without this patch.

Change-Id: I6ac495adca8e15878989375ef8b2de472788279a
DO NOT MERGE: reenable LOK tiled rendering test (BRANCH ONLY).

Change-Id: Ica4e570cafa25f4c642016608d8d510e668ed701