Differentiable Programming of Chemical Reaction Networks