Flow and retention in the ecology of stream invertebrates