Method and device for measuring the electric current supplied by a power line has a railway vehicle