Former Manchester United star Nani, whose brief A-League stint with Melbourne Victory ended in serious injury, has retired from football.