fix bugs in promise:wait which didn't properly pass timeout argument, and which reversed the logic of the return value