Repeated derivatives of composite functions and generalizations of the Leibniz rule