I tried some tests for further debunking of desalination myths and to help confirm Sphalerite's results.
I channeled off a section of the beach (channels are a barrier to waves). Behind the channel, I channeled a cistern
in the beach (conglomerate), I then pumped water into it.
Result: Fresh
Next I build a cistern - without a constructed floor - on the beach (again, walling off the waves themselves). Result: Fresh.
I also build a cistern with a constructed floor on the beach. In that case I didn't make any special effort to stop the waves, in fact I deliberately watched them wash all over the floor before finishing off the wall and pump. Result: Fresh.
And I build a cistern without a constructed floor in the waviest bloody spot I could find with the waves going right in the front. Result: Fresh.
The walled cisterns all remained fresh permanently (whether or not they had constructed floors).
However the cisterns channeled into the beach, went salty after a short time, even if they were fully sealed in by walls.
I also noticed something weird with pumping on the beach. Sometimes waves would emanate from the pumps even though the pump output had no possible way to escape (I suspect it is these "pump waves" or related breaches of physics which re-salinate fully-sealed dug out reservoirs on beaches).
Here's an image of my horribly messy testing setup:
What I particularly want to draw your attention to is the little reservoir on the far left; now I couldn't fill that one because it was under the influence of beach-physics, the beach seems to function as an aquifer which doesn't produce water, but does absorb pressurized water, so if you channel into the beach, water on top of the beach will drain into the channels. But the funny thing is, the water in the channel itself, is still fresh, that is a fresh water cistern. In other words, even contact with the beach-pseudo-aquifer - even in fact being stored in the beach-pseudo-aquifer - isn't sufficient to re-salinate water.
On the right side of the screen, the small walled-reservoirs on the beach are all perfectly fresh water, in spite of the fact that I filled them, removed the pumps, let them drain, let the waves wash through them, rebuilt the pumps and finally re-filled them. They remained fresh. Waves seem to have no ability at all to contaminate on their own z-level - they need to go down a channel (and "manifest" as real salt water) to do this.
So I concluded that water only re-salinates when it contacts genuinely existing salty water. I went out to test this further and confirm Sphalerite's result:
This is a perfectly fresh water cistern. Now my hypothesis was, when I opened the floodgate, the fresh water would flow out, contact salty water, and the saltiness, like electrical current, would propagate back into the reservoir. This turned up to be exactly what happened, when the fresh water stream hit the salt water, the whole reservoir turned salty. However, it wasn't sufficient for the fresh water stream to merely touch the waves, it was only when I dug out a channel bringing salt water nearer to the drain, that a "genuine water" connection could be made. It seems that waves by themselves are utterly harmless.
And I also repeat my earlier results, that I managed to empty small, 2x2 and 1x1 reservoirs and refill them without them being contanemated, even though the water drained into saltwater channels. I believe what must have happened there is that the fresh water quickly spread out to less than 3/7 depth before contacting the salt water. It is likely that two bodies of water need to be connected by at least 3/7 water before they count as the same body of water allowing saltiness to propagate.
So it seems that the only two critical things, is to avoid digging cisterns into the beach (this should be common sense), although building cisterns ON the beach is fine, and avoid letting the body of fresh water contact a body of salty water. Other than that, it seems you can dig or build your desalination cisterns wherever and however you like.
I also noticed some funny things with waves. Waves seem to propagate line-of-sight from the ocean. A straight horizontal mine shaft, going across the map and entering the ocean (at the highest water layer of the ocean), produced waves (and mist) on the floors of a chamber at the far end, 3 embark tiles away from the ocean in a different biome. Sadly though the mist didn't make the dwarves happy.