Irish leaders end deadlock, make deal for new government