In the proof of the parallel axis theorem, why is the averaged $x$-coordinate "zero by construction"? According to Wikipedia to prove $I=I_{cm}+md^2$: 

$I_\mathrm{cm} = \int (x^2 + y^2) \, dm.$ $$I = \int
 \left[(x + d)^2 + y^2\right] \, dm$$
Expanding the brackets yields
$$I = \int (x^2 + y^2) \, dm + d^2 \int dm + 2d\int x\,
 dm.$$ The first term is $I_{cm}$ and the
  second term becomes $md^2$. The integral in the
  final term is the $x$-coordinate of the centre of mass, which is zero by
  construction.

I'm confused as to why the third term is 0, probably because I don't understand how the $dm$ mass axis of integration is defined. 
 A: It's zero by definition of the centre of mass.
We define the centre of mass as the unique point $\vec{r}_{CM}$ where $\int dm  (\vec{r}-\vec{r}_{CM}) = 0$.
Then we define the moment of inertia about an axis passing through the point $O$ with position vector $\vec{r}_O$ as:
$I_O = \int dm (\vec{r} - \vec{r}_O)^2$
In this expression we add and subtract $\vec{r}_{CM}$ to get:
$I_O = \int dm (\vec{r} - \vec{r}_{CM} + \vec{r}_{CM} - \vec{r}_O)^2$
Relabelling $\vec{r}_{CM} - \vec{r}_O = \vec{d}$ gives $I_O = I_{CM} + Md^2 + 2\vec{d} \cdot \int dm (\vec{r}-\vec{r}_{CM})$
The last integral is the one you had represented as $\int dm x$ Presumably your $x$ is defined relative to the centre of mass, I've just made this explicit by having everything defined in terms of vectors with an arbitrary origin. The last integral vanishes by comparison to the definition of centre of mass at the beginning.

P.S. all the integrals with respect to mass are defined as $\int dm = \int dV \rho $ where both integrals are taken over the body in question and $\rho$ is the mass density in the volume considered. (Or alternatively, they're defined over all space, and the fact that $\rho$ vanishes when you're not in the body causes those contributions to vanish).
A: Here's a much simpler explanation without vectors. Let the new axis (i.e., the axis that's at a distance $d$ from the CoM) pass through the origin. In this frame, let the CoM be at $x$. We simply need to evaluate the integral for the moment of intertia in this frame.
$I = \int_{-r}^{r}(x+d)^2dm\\
I = \int_{-r}^{r}(x^2)dm + \int_{-r}^{r}(d^2)dm + 2d\int_{-r}^{r}(x)dm$
As you can see, the third term goes to zero.
