engine: fixed coverity detected issues

- Fixed thread unsafe access to field in singleton.
- Fixed String to bytes conversion not specifying encoding.

Change-Id: I8aa94e3e52adbfac544e6a11feba25ae72d2beac
Signed-off-by: Alexander Wels <awels@redhat.com>