A historic steam locomotive passed through Bradford on Avon railway station to exultant crowds.