General integrated rate law for complex self-assembly reactions reveals the mechanism of amyloid-beta coaggregation