Red Bull's Sergio Perez and Aston Martin's Fernando Alonso enjoyed an epic battle in the final stages of the Sao Paulo Grand Prix.