Looks like I got it. I think it was my display driver (Intel Extreme Graphics). I decided to go to the Dell website and download the official Dell drivers. I should have installed the drivers one by one so I could identify which driver it was that caused the problem, but I just installed the drivers together and rebooted. So far the problem seems to have gone away, no lockups in about 10 tests.
I normally go to the device makers website to get driver updates, so maybe the newest version of the Intel or Synaptics driver was incompatible with my laptop. The Dell drivers seem to work just fine.
Thanks WarezMonster for all your replies!