Fix context cleanup


Context was not getting properly cleaned up in cases where
render thread stopped before the cleanup took place.
Now we ensure that required cleanup is done before context
thread terminates.

Change-Id: I1489914dafec928eebb69bac737f6f858ff49432
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
commit732c9f39f08d7867c8e127c84d319ae514d682fd
parent8ff6a5d6d89d80707dc07fc96e22160fa1f8e973
authorMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>
committerMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>
commit timeMon, 13 Oct 2014 10:33:10 +0300