PUlling a cord in a station is the best idea, provided you can get a telephone link to 999/112 ASAP. Stopping in between wastes valuable time and, in the case of say a heart attack, would probably only make the condition worse.
I don't know what a real driver would do but, of the cord was pulled on a limited stop services and I was near a station, I would stop at it to allow a quick and easy evacuation if needed. I think a driver would notice the train being on fire somehow and if not, the guard can communicate on many trains IIRC. Of course, of you're in the middle of nowhere between Aberdeen and Inverness, best thing is to stop. Why wait potentially 30 minutes when you can get an ambulance to, say, just off this road here? Would probably be quicker.
Best thing is to be able to talk to a moving driver in such a circumstance. This prevents the train stopping in cases of prank or accidental pulling of the cord, and if the driver knows the nature of the emergency, can act appropriately. eg. In a fire stop ASAP, for a medical emergency, use route knowledge to determine if a suitible station nearby is the better option for emergency services.
Out of curiosity, on, say, a 2x158 unit, if the rear unit goes on fire, can the crew evacuate and separate the front unit to stop that going on fire or would it take too long? Assuming the fire was in the very rear of the train, of course.