Better format unit flags

Signed-off-by: Michal Čihař <michal@cihar.com>
Prepare infrastructure for flags editing

Issue #540

Signed-off-by: Michal Čihař <michal@cihar.com>