Assume for simplicity that the speed of light $c=1$. The existence of the gauge $4$-potential $A^{\mu}=(\phi, \vec{A})$ alone implies that the source-free Maxwell equations
$$\vec{\nabla} \cdot \vec{B} ~=~ 0 \qquad ``\text{no magnetic monopole"}$$
$$ \vec{\nabla} \times \vec{E} + \frac{\partial \vec{B}}{\partial t} ~=~ \vec{0}\qquad ``\text{Faraday's law"}$$
are already identically satisfied. To prove them, just use the definition of the electric field
$$\vec{E}~:=~-\vec{\nabla}\phi-\frac{\partial \vec{A}}{\partial t},$$
and the magnetic field
$$\vec{B}~:=~\vec{\nabla}\times\vec{A}$$
in terms of the gauge $4$-potential $A^{\mu}=(\phi, \vec{A})$.
The above is more naturally discussed in a manifestly Lorentz-covariant notation.
OP might also find this Phys.SE post interesting.
Thus, to repeat, even before starting varying the Maxwell action $S[A]$, the fact that the action $S[A]$ is formulated in terms the gauge $4$-potential $A^{\mu}$ means that the source-free Maxwell equations are identically satisfied. Phrased differently, since the source-free Maxwell equations are manifestly implemented from the very beginning in this approach, varying the Maxwell action $S[A]$ will not affect the status of the source-free Maxwell equations whatsoever.
As far as I can remember, the formula you obtain is right. You can make this "problematic" integral disappear by using the following identity, that we will call "curl theorem" :
$$\int\vec{\nabla}\times\vec{w}dV = -\int\vec{w}\times d\vec{S}$$
To show this is true, we are going to use the divergence or Green-Ostrogradski theorem, namely
$$\int\vec{\nabla}\cdot \vec{v}dV = \int \vec{v}\cdot d\vec{S}$$
Since the divergence theorem is a scalar identity while the curl theorem is a vector identity, we are going to need three distinct vector fields that we are going to denote $\vec{v}_i$. Now, we would want $\vec{\nabla}\cdot\vec{v}_i = (\vec{\nabla}\times\vec{w})_i$ to deduce an identity on the curl. Writing that in tensor notation :
$$\partial^k(v_i)_k=\epsilon_{ikl}\partial^k w^l$$
As we can see, it is sufficient to take $(\vec{v}_i)_k = \epsilon_{ikl}w^l$ and the relation will be satisfied. So, for such a vector field we have $\vec{\nabla}\cdot\vec{v}_i = (\vec{\nabla}\times\vec{w})_i$.
Applying the divergence theorem to $\vec{v}_i$ :
$$\int(\vec{\nabla}\times\vec{w})_idV = \int\vec{\nabla}\cdot\vec{v}_idV = \int\vec{v_i}\cdot d\vec{S} = \int (v_i)_k(d\vec{S})^k = \int\epsilon_{ikl}w^l(d\vec{S})^k = -\int(\vec{w}\times d\vec{S})_i$$
Thus giving a proof of the "curl theorem". Using it on your problematic integral :
$$-\frac{\mu_0}{4\pi}\int\nabla'\times\left(\frac{\mathbf{J}(\mathbf{x}')}{|\mathbf{x}-\mathbf{x}'|}\right)\,d^3\mathbf{x}' = -\frac{\mu_0}{4\pi}\int\left(\frac{\mathbf{J}(\mathbf{x}')}{|\mathbf{x}-\mathbf{x}'|}\right)\,\times d\vec{S}'$$
Now, the volume integral is done on all of space, and provided you suppose that $\lim_{x'\rightarrow\infty}\frac{\vec{J}(x')}{|x-x'|} = 0$, it gives a 0 contribution. Why does this not add any crazy assumptions ?
For this limit to be non-zero, we must necessarily have that $|J(x)|$ tend to infinity. Indeed, suppose $J(x)$ is finite. Then, there is a constant $C$ such that $|J(x)|<C$. Then, $lim_{x'\rightarrow\infty}\frac{|J(x')|}{|x-x'|}<\lim_{x'\rightarrow\infty}\frac{C}{|x-x'|} = 0$. Thus, if we were to have this "extra" integral not vanish, we would be required to have an infinite current density at infinity, which seems to be not so physical.
Of course, all my derivation where done in the context of well-behaved functions. It won't work say for an infinitely small wire, as the current density becomes a distribution (using the dirac delta $\delta(x)$). I am not qualified enough to tackle this case rigorously, but I hope the explanation above gives an idea to why setting this integral to 0 is sensible.
Best Answer
Although this is a standard derivation, you frequently don't see it in introductory electromagnetism courses, maybe because those courses shy away from the heavy use of vector calculus. Here's the usual approach. We'll find a wave equation from Maxwell's equations.
Start with
$\nabla \times \vec{E} = -\frac{\partial\vec{B}}{\partial t}$.
Take a partial derivative of both sides with respect to time. The curl operator has no partial with respect to time, so this becomes
$\nabla \times \frac{\partial\vec{E}}{\partial t} = -\frac{\partial^2\vec{B}}{\partial t^2}$.
There's another of Maxwell's equations that tells us about $\partial\vec{E}/\partial t$.
$\nabla \times \vec{B} = \mu_0\epsilon_0\frac{\partial \vec{E}}{\partial t}$
Solve this for $\partial\vec{E}/\partial t$ and plug into the previous expression to get
$\nabla \times \frac{(\nabla \times \vec{B})}{\mu_0\epsilon_0} = -\frac{\partial^2 \vec{B}}{\partial t^2}$
the curl of curl identity lets us rewrite this as
$\frac{1}{\mu_0 \epsilon_0}\left(\nabla(\nabla \cdot \vec{B}) - \nabla^2\vec{B}\right) = -\frac{\partial^2 \vec{B}}{\partial t^2}$
But the divergence of the magnetic field is zero, so kill that term, and rearrange to
$\frac{-1}{\mu_0 \epsilon_0}\nabla^2\vec{B} + \frac{\partial^2 \vec{B}}{\partial t^2} = 0$
This is the wave equation we're seeking. One solution is
$\vec{B} = B_0 e^{i (\vec{x}\cdot\vec{k} - \omega t) }$.
This represents a plane wave traveling in the direction of the vector $\vec{k}$ with frequency $\omega$ and phase velocity $v = \omega/|\vec{k}|$. In order to be a solution, this equation needs to have
$\frac{\omega^2}{k^2} = \frac{1}{\mu_0\epsilon_0}$.
Or, setting $v = 1/\sqrt{\mu_0\epsilon_0}$
$\frac{\omega}{k} = v$
This is called the dispersion relation. The speed that electromagnetic signals travel is given by the group velocity
$\frac{d\omega}{d k} = v$
So electromagnetic signals in a vacuum travel at speed $c = 1/\sqrt{\mu_0\epsilon_0}$.
Edit You can follow the same steps to derive the wave equation for $\vec{E}$, but you will have to assume you're in free space, i.e. $\rho = 0$.
Edit The curl of the curl identity was wrong, there's a negative number in there