Fix crash when invalidating QSGContext.

A pointer list was not cleared when invalidating the context,
potentially holding dangling pointers after that.

Change-Id: I0618c54ffa67b31b115901e8be3a6d3cd16dc844
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>