The consensus in the bug was:
I think that asking explicitly in the dismantle confirmation which wares should be kept is the best and clearest way of handling this problem. If you skip the confirmation with Ctrl+click, the default way should be to remove all wares before the building is dismantled because this is the way most people use (based on the comments in https://wl.widelands.org/forum/topic/1093/). It should be the same thing if you upgrade a building (to be consistent).
Adding a 3rd button to the confirmation dialog would mean the least mouseclicks for the user, and also the smallest code change.