kpartx: handle more than 256 loop devices

Update the loop handling code to support more than 256
devices.

References: bnc#898427

Signed-off-by: Hannes Reinecke <hare@suse.de>
devmapper: do not flush I/O for DM_DEVICE_CREATE

DM_DEVICE_CREATE loads a new table, so there cannot be any
I/O pending. Hence we should be setting the 'no flush'
and 'skip lockfs' flag to avoid delays during creation.

References: bnc#901809

Signed-off-by: Hannes Reinecke <hare@suse.de>