Low: scheduler: improve error handling when unpacking resources
Previously, pe__unpack_resource() was inconsistent about freeing memory and
setting *rsc to NULL on errors, and callers were inconsistent about freeing
*rsc, potentially causing memory leaks or segmentation faults.
Now, pe__unpack_resources() always frees and NULLs *rsc on error.
Also improve the function's log messages.