core: context: support 'before', 'after' in sequence

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