Enable equality comparisons on GPU.
Since std::equal_to::operator() is not a device function, it
fails on GPU. On my device, I seem to get a silent crash in the
kernel (no reported error, but the kernel does not complete).
Replacing this with a portable version enables comparisons on device.
Addresses #2292 (closed) - would need to be cherry-picked. The 3.3 branch
also requires adding EIGEN_DEVICE_FUNC in BooleanRedux.h to get
fully working.