realtime_zsl: Make a helper to combine error and pending entries Moves the logic to a helper function that combines error and pending entries into the result. This commit doesn't change functionality, and is meant to allow future commits to re-use the same logic. Bug: 235371520 Test: Framework stress test, CTS Change-Id: I6a751794b4f5d087280708278f13769fe18cdb34