Fix scan-build warning (null use).

Probably false positive but defensive approach is better here.
Workaround for scan-build false positive.

Also tidy code to be more readable.
Do not allocate big context on stack for cryptsetup-reencrypt.
Avoid compilation warnings in Python wrapper.

All these are Python interface misconceptions,
the strings (or string arrays) in parameters should be const
parameters.

To avoid gcc confusing warnings just explicitly re-cast them.