Putin has signed a bill allowing Russia to register international media outlets as foreign agents.