Anticipatory flexibility: larval population density in moths determines male investment in antennae, wings and testes