The European Commission has closed its investigation into the brewers Carlsberg and Heineken over an alleged market-sharing agreement.