jpeg_acquire_codec_handle acquires s_jpeg_platform.mutex at entry
but two ESP_RETURN_ON_* macros (semaphore-create and PM-lock-create
failure) return without releasing it. Replace with ESP_GOTO_ON_*
that jumps to a cleanup label which frees partial resources, NULLs
the codec pointer, and releases the mutex.
Move per-target JPEG regdma retention descriptors out of esp_hal_jpeg
and into
esp_driver_jpeg so the codec driver owns its backup scope and restore
flow.