Optimal daily routines of singing and foraging in a bird singing to attract a mate