Poland and the Czech Republic have signed an agreement to end the dispute over the operation of the Turów Brown Coal Mine.