obs-nvenc: Fix resource destruction order

The NVENC session was destroyed before its child resources
(textures, surfaces) were cleaned up, causing resource cleanup
calls to operate on an invalid session handle.

Reorder destruction to free all registered resources before
destroying the encoder session.
This commit is contained in:
Internal Server Error - Gitea: Git with a cup of tea
500 Internal Server Error

Gitea Version: 1.28.0+dev-477-g8b6ad49a5f