Minnesota lawmakers settled on a bipartisan power-sharing agreement in the state House, ending a weekslong political stalemate in one of the most closely divided legislative bodies in the country.