The Impact of the Barnett Formula on the Scottish Economy: Endogenous Population and Variable Formula Proportions