Mark Williams learns how frantic competition among Welsh rivals drove the development and installation of the world's first steam locomotive