The EU's appeal court has ruled that Germany's Metro group can register its name as a trademark in Europe, overturning Tesco's sole claim to the name.