engine: Version cleanup

- replaced String concatenation with StringBuilder
- replaced reference comparison with strings to StringBuilder length
  check
- refactored the version component addition to a new method
  appendVersionComponent

Change-Id: I7dba498fa54bae997d08e7457dd53eb60a740199
Signed-off-by: Laszlo Hornyak <lhornyak@redhat.com>