Researchers have studied more than half a million people across the UK to understand the genetic links of maternal smoking.