Divide check-ref targets into check-ref-cpu and check-ref-gpu

This allows us to run the CPU and GPU tests individually. Also note that I put the CPU tests before the GPU tests. This is because the CPU tests tend to be less buggy, and will catch real errors quicker.