Real Madrid president Perez resigns