Theory of neck formation in the stretching of polymers