Fix missing SYNC_THREADS check in equals()

The implementation of `equals()` and `equals_scalar()` in `cudamat.cu` did not check for `SYNC_THREADS` before calling `cudaThreadSynchronize()`.