In his final address, outgoing US President Joe Biden has told the UN "Putin's war has failed" and called for calm in the Middle East.