A top EU court has put an end to a long-running battle by ruling that Parma ham and Grana Padano cheese can only be sliced and grated in the region where they are produced.