gladeui: Fix wrong pointer convertion in GladeDesignView
Also use g_assert in static functions to always ensure that we're getting the right type.
GNOME Builder is using it like this itself and it allows to find mistakes faster.
It can also be disabled for release builds by defining G_DISABLE_ASSERT