Growth and form of sponges and corals in a moving fluid