fix(HTGGradient): fix crash caused by htg masks.
The HTGGradient filter doesn't support masks but those could be given to its input, which could cause a crash. It has been fixed by shallow copying the input to process the HTG and by removing the mask from the copy.