On the complexity of general matrix scaling and entropy minimization via the RAS algorithm