Gregor Townsend praised the second-half contribution from his bench as sluggish Scotland came from behind to defeat Fiji at Murrayfield.