VKalVrt: Do "state" dynamic check only in debug builds
Dynamic casts are costly for trivial methods and incorrect state is unlikely to be passed by clients so the dynamic check is moved into an assert to only execute inside debug builds.
cc @christos