Introduce state storing for mac and android.


At least some mac and android environments do not handle
shared contexts properly, leading to slowdowns and/or artifacts.
Disable context sharing on mac and android, and instead
store and restore relevant opengl state.

Also improve renderer and context cleanup

Change-Id: I8fa596b95f6ff20d53c950a34b5c28513acbc18f
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
commit86b4e19ee160ee3e84210595db5e6af08a8b9e46
parent34a7223467a45e33c1b344f1e1880bc818b66b27
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
committerMiikka Heikkinen <miikka.heikkinen@digia.com>
commit timeFri, 28 Feb 2014 11:05:25 +0200