Remove C-style casts from public headers

Task-number: QTBUG-32735
Change-Id: I861e3c6b277a0a2c99f388800932dceb26bab021
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Fix GCC warning about non-virtual destructor on virtual class

warning: deleting object of polymorphic class type ‘QGLTextureCubePrivate’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

Change-Id: I738eb6a83925148e06b9ada467fdce2a65e49a60
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>