I do know that you first get a message that a player has finished the wonder. Only the turn after that, the production invested in the wonder is converted into gold. So it can never be that you finish a wonder without knowing that it was already finished and the next turn it is sold.
I've been beaten to wonders and the wonder is never directly converted to money when you get the report that the wonder was finished by another player. You can wait one turn and only then it will be converted into money.
If you don't watch the messages carefully or look in the log, then you might miss the message. If you still have a savegame of the turn before the selling of the wonder, then you can see if the turn log contains a message that says that the wonder has already been finished.
I have never been in a tie before and have never tested it, but remember to have read a statement that first all production of a turn is finished and only then all movement is conducted. So along the lines:
player A produces, player B produces, player C produces,
player A moves, player B moves, player C moves,
player A produces, player B produces, player C produces,
player A moves, player B moves, player C moves,
I don't know for sure if this is true as I've never tested it before. But it seems like a logical system and it certainly allows rushed units to be finished before the next attack on a city occurs. This system actually never has ties as the players move in turns. The one who is earlier in the turn has finished its production earlier.
The person claiming that this was the way it worked, claimed that the human player started first in the first turn of the game and the order remained the same from that moment on. So the human has a slight advantage.