feat(rme/spm): code reuse and refactoring

- Reuse of existing wait_for_non_lead_cpus() function helper.
- Create a function to reset delegated buffers to undelegated state.

Signed-off-by: Nabil Kahlouche <nabil.kahlouche@arm.com>
Change-Id: If5c24da0002d100419220fe0e5409b73596e773c
1 file changed