I hate developing without multiple monitors. That said, the 5K display looks great… Both machines you mention are really overpowered for standard web development, so I doubt it would make you any more/less productive EXCEPT you loose your mobility with the iMac.
As you know, parallelTtests really come down to CORES and RAM (assuming your test DB is small enough to fit in RAM) and HDD TPS (small block read/writes) - so SSD is critical to fast tests, maybe even more than CPU Cores. I don’t have any hard stats to back that up, just a gut feel.
Personally, I never buy new, I have a fully loaded 2008 Mac Pro v8 with 16GB Ram, SSD boot drive, 4 TB usable in a RAID5 and dual monitors that I put together off eBay for $700… With the difference compared to a new iMac 5K, I can bring the family to Maui