Move Image/Build states into own class

Reduce some confustion in worker/shell by replacing
the handwritten strings with some named classes

Change-Id: Ifecf76904f614942a4661d9d9ac71d8fae78cf94
Merge "Move Image/Build states into own class"