An integrated evaluation of costs and benefits of corticosterone secretion through development