Internet companies will face massive fines for hosting content that glorifies terrorism, under new powers for the media regulator.