Minor refactoring of dynamic_ui package.

Remove one inner import in dynamic_ui.services and rewrite a bit
iterate_over_services() function.

Change-Id: If14022435a5ef269a448d5f568fe0f33421c9f23