The heads of the two key UN agencies championing refugees and migrants have called for an end to their “arbitrary detention” across Libya, following an agreement on Tuesday by European Union countries to offer those fleeing across the Mediterranean a safe berth through a new distribution mechanism.