Egg distribution within patches: an optimality problem for insects