I like this idea a lot.
I'll be honest, I don't agree with the majority in thinking that Goldust should turn heel for this storyline. I'd prefer it to be face vs face, or if anyone turns, then Cody should. I think that Goldust is at that stage where he's going to get a pop whatever happens, much like HBK still got cheered for the most part when he was clearly playing a heel on Raw on Monday.
If anyone of them turns, then Cody's your man I think, but having said that, I think that WWE are pushing Cody ever so slightly to be a top guy (at least I can see 2014 being a big year for him), so I can see them pushing him as a face, plus he isn't doing a horrible job as a face at the minute. But I think Goldust vs Cody would work great as a face vs face feud, in the scenario suggested in the OP. Even add Dusty as the special guest referee for the match.