libfdisk: (dos) more carefully check for primary partitions

  * check if there is space for primary partitions, if no and extended
    exists then create logical partitions

  * create extended if @pa->type is extended partition

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: fix script partitions size parsing

Signed-off-by: Karel Zak <kzak@redhat.com>
sfdisk: implement command_fdisk()

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