Differentiating a vector product $$m_i\mathbf{r}_i\times\frac{\mathrm{d}^2\mathbf{r}_i}{\mathrm{d}t^2} = \frac{\mathrm{d}}{\mathrm{d}t}\biggl(m_i\mathbf{r}_i\times\frac{\mathrm{d}\mathbf{r}_i}{\mathrm{d}t}\biggr)$$
I do not understand this. How did the $\mathrm{d}/\mathrm{d}t$ go out?
 A: There is a identity for the derivative of the cross-product of two vector functions $\mathbf A(t)$ and $\mathbf B(t)$;
\begin{align}
  \frac{d}{dt} (\mathbf A \times \mathbf B) = \frac{d\mathbf A}{dt}\times \mathbf B + \mathbf A\times \frac{d\mathbf B}{dt}
\end{align}
Using this rule with the computation you're considering, we obtain
\begin{align}
  \frac{d}{dt}\left(m_i\mathbf r_i\times \frac{d\mathbf r_i}{dt}\right)
  = m_i \frac{d\mathbf r_i}{dt}\times \frac{d\mathbf r_i}{dt} + m_i\mathbf r_i\times \frac{d^2\mathbf r_i}{dt^2}
  = m_i\mathbf r_i\times \frac{d^2\mathbf r_i}{dt^2}
\end{align}
where in the last step, we have used the fact that the cross product of any vector with itself is zero.
A: *

*The vector product of a vector $\vec{a}$ with itself is alwals zero: $\vec{a} \times \vec{a} = 0$ 

*For two smooth vector-valued functions $\vec{a},\vec{b} \colon \mathbb{R} \to \mathbb{R}^3$ the product rule holds: 
$$
\frac{d}{dt} (\vec{a} \times \vec{b}) = \frac{d}{dt} \vec{a} \times \vec{b} + \vec{a} \times \frac{d}{dt} \vec{b}
$$
You can see this for example, if you write out the components (then it is just the ordinary product rule).
Take for example the first component: 
$$
\begin{align}
\left (\frac{d}{dt} (\vec{a} \times \vec{b}) \right)_1 &= \frac{d}{dt} (a_2b_3 - a_3 b_2)\\ &= \frac{d}{dt}(a_2b_3) - \frac{d}{dt}(a_3 b_2)\\ &= \left(\frac{d}{dt}a_2\right) b_3 + a_2 \frac{d}{dt} b_3 - \left(\frac{d}{dt}a_3\right) b_2 - a_3 \frac{d}{dt} b_2\\ &= \left(\frac{d}{dt}a_2\right) b_3 - \left(\frac{d}{dt}a_3\right) b_2 + a_2 \frac{d}{dt} b_3 - a_3 \frac{d}{dt} b_2 \\ &=  \left(\frac{d}{dt} \vec{a} \times \vec{b}\right)_1 + \left(\vec{a} \times \frac{d}{dt} \vec{b}\right)_1
\end{align}
$$
Putting this together you get your result: 
$$
  \frac{d}{dt}\left(m_i \vec{r}_i\times \frac{d \vec{r}_i}{dt}\right)
  = m_i \frac{d \vec{r}_i}{dt}\times \frac{d \vec{r}_i}{dt} + m_i \vec{r}_i\times \frac{d^2\vec{r}_i}{dt^2}
  = m_i\vec{r}_i\times \frac{d^2\vec{r}_i}{dt^2}
$$
