ENH: use copy to move the masked values into the result

saves a relatively expensive bool -> x cast
MAINT: replace two step errstate change with a direct change
Merge pull request #4822 from juliantaylor/masked-improv

small masked array performance enhancement