Why is centre of mass taken as integral of $x.dm$ and not $m.dx$? 
Forgive me if I'm being naive, but, I don't understand why the $x$-coordinate of the Centre of mass is taken as an integral of $x.dm$ and not $m.dx$?

I understand the summation part, but how do we convert that into an integral? It could very well be a mathematics question, as the fundamentals of calculus, since it belongs in the domain of physic, I thought might as well.
Besides isn't the $x$-coordinate the independent quantity just as time is the independent quantity for when we write acceleration as the integral of $v.dt$? This is really troubling!
 A: We integrate $x\, dm$ to say "for every piece of mass $dm$, sum up the amount of mass times the coordinate $x$ of that mass".
It's intuitive to integrate over $m$, because every piece of mass has an $x$-coordinate. Likewise, in kinematics, it makes intuitive sense to integrate over $t$ because for every $t$ we have a velocity $v(t)$. 
However, the calculus works either way; you can flip the integration to $x$ if you want. For example, by the chain rule, $x\, dm = x (dm/dx)\, dx = \rho(x) x\, dx$, where $\rho$ is the density. This is also a totally valid way of computing the center of mass: "for every interval $dx$, sum up the amount of mass $\rho(x)\, dx$ there times the coordinate $x$". 
You might ask, how does one integrate with respect to $m$? Well, 99% of the time you do what I just did, flipping the integration to be over $x$. But we prefer to write the equation in the $dm$ form because it's conceptually simpler. For a worked example, see here.
A: The center of mass is an average position of a set of masses, with the position of each mass having an importance/probability factor directly proportional to the mass.  When you find an average of some quantity Y which has importance p we do the following:
$$\langle Y\rangle =\frac{\sum_j Y_j p_j}{\sum_j p_j}.$$
For center of mass, $Y_j\to x_j$ and $p_j\to m_j$.  For a continuous body, we split the body into quintillions of really small masses and do the sum, which now can become an integral, adding up the little masses, dm multiplied by the position x, because each small mass has a position, and the mass tells us how important the position is. But to actually do the integral, you have to find the function m(x) and then find dm in terms of dx.
So the integral is actually adding up the product of position$\times$importance of position, where the importance factor is the mass between x and x+ dx.
