Ahead of his final Test match against Pakistan, David Warner announced he will also retire from ODI cricket.