Improve LZW compression by using predictor whenever possible

Using the predicor saves up to 50% of space.
In theory, there is a trade-off, as there _might_ be readers which support LZW compression,
but not predictors. However, in such case, the user can just not use compression at all.

Also simplify the code for 1D arrays (which are really just 2D arrays of height ==1)
Avoid exec when adding new TIFF tags

exec is too ugly, replace by more explicit code to add the variable to the module