OK, this has officially turned bizarre. I decided to try a simple approach and just replace the pressure relief valve. Everything somehow worked fine for fifteen years, so maybe the new valve will last longer than the water heater?
I install the new valve, and even after the heater is on for several hours, I'm still getting cold water at the sink and the wash stall. I use my new PRV to remove a couple of glasses of water directly from the hot water heater, and sure enough, it's warm. I decide to give up for the night, and I shut off the power and water, and I open the hot water at the sink to relieve the pressure. It runs for a while - I guess due to gravity, since the heater is higher than the sink.
Low and behold, the water turned warm. So if the water is turned on, I get nothing but cold water. If the water is off, I get some hot water flowing down from the heater.
Here is a picture of the pipes, with arrows showing the normal flow of hot and cold water to and from the water heater.
There is a valve near the top of this picture that blends hot and cold water to send warm water out to the wash stall. I'm thinking this valve is somehow allowing the cold water to go out the left side, so it is sending cold water into the hot water pipe. I don't know if that's feasible, but it's the only physical explanation I can find for what's happening.
Unless somebody sees something I'm missing, I'm thinking it's time to bring in a plumber.