Tim Dunn heads to the seaside to find out how the railways changed the fortunes of Margate and Ramsgate, and finds out more about 19th-century Dom Luiz Bridge in Porto