Thousands of unmarried women in Scotland were forced to give their children up in the last century.