Support for allow_versions in swift containers

The previous patch (37493) was just implementing the feature partially

Change-Id: I0adc55a22161fa3768d941e5ae996cc47048efa5
(cherry picked from commit d0caf589164bb729493637a4c24cb24c83d8ca5e)
Merge remote-tracking branch 'upstream/stable/havana' into havana