mkswap: coding style improvements

Signed-off-by: Karel Zak <kzak@redhat.com>
mkswap: always use header from control struct

Signed-off-by: Karel Zak <kzak@redhat.com>
mkswap: device open code refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
mkswap: device write code refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
mkswap: make final report more human readable

Signed-off-by: Karel Zak <kzak@redhat.com>