core: support more complex sequence relationships

perform before/after multiple times to allow list to be synchronized.

Change-Id: I28ca4fdf48f657feaf72c928d61f4f8a5996bad8
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>