Alberdi, Constitución y revolución