Capital-breeding and reproductive effort in a variable environment: a longitudinal study of a viviparous snake