Move safe table params wipe into function which allocates it.
Re-check flags after DM device creations.
Properly allow activation of discard even if dm_crypt module is not yet loaded.

The dm_flags() call cannot be used if dmcrypt module is not present.

Better try to activate volume with dicard flags and if it is not possible,
try to activate device without the discard flag.