refactoring: use constants for engine states instead of plain strings

Change-Id: I27ccb6533676edfc1b5bfbf009d5820853eebab6
Signed-off-by: Jiri Moskovcak <jmoskovc@redhat.com>