Fix get_pixels for new df=TRUE behavior with extract.

Also wwitch to importFrom for foreach.