Fix crash on setCursorSurface when the surface is null.

Change-Id: I29e0fda4548228701c1d367513adc2021de61f2e
Done-with: Vesa Halttunen <vesa.halttunen@jollamobile.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>