Every profinite group is naturally an affine group scheme over $\mathbb Q$? I saw a special case of this after reading about the Weil group and the Weil-Deligne group.  Since I'm trying to become more technically proficient in algebraic geometry, I thought this was interesting topic to explore in more generality.
Let $G$ be a profinite group.  It is compact, Hausdorff, and totally disconnected.  This question of mine shows that $x \mapsto \mathfrak p_x$ defines a bijection $G \rightarrow \operatorname{spec}R$, where $R$ is the $\mathbb Q$-algebra of locally constant functions $G \rightarrow \mathbb Q$.  
This bijection is moreover easily seen to be a homemorphism of topological spaces.  And moreover, it is easy to see that $G \times G$ identifies with $\operatorname{spec} R \otimes_{\mathbb Q} R$, as my answer shows here.  Namely, $(x,y)$ goes to $(\mathfrak p_x, \mathfrak p_y)$ goes to $\mathfrak p_x \otimes R + R \otimes \mathfrak p_y$.  
I now want to say that $G$ is naturally a group scheme over $\mathbb Q$.  Is this the case?  We would first need to show that the multiplication and inversion maps $G \times G \rightarrow G, G \rightarrow G$ are morphisms of schemes over $\mathbb Q$, and then show that they satisfies the axioms for a group scheme.
I believe first that the $\mathbb Q$-algebra homomorphism $R \rightarrow R \otimes_{\mathbb Q} R$ coming from multiplication $G \times G \rightarrow G$ should be something like this: if $f \in R$, then the map $(x,y) \mapsto f(x,y)$ is a locally constant function $G \times G \rightarrow G$.  It therefore corresponds to a unique element of $R \otimes_{\mathbb Q}R$.  
Inversion should be similar: $R \rightarrow R$ will just send a map $f: G \rightarrow \mathbb Q$ to the map $x \mapsto f(x^{-1})$.  
 A: Yes, this is correct.  Here is a broader result that is in the background, which I alluded to in my previous answer.

Let $K$ be a field.  Let $\mathbf{Stone}$ be the category of profinite sets (aka totally disconnected compact Hausdorff spaces) and let $\mathbf{Idem}_K$ be the category of $K$-algebras that are generated by idempotents.  Then $\mathrm{Spec}:\mathbf{Idem}_K^{op}\to\mathbf{Stone}$ and $LC:\mathbf{Stone}\to\mathbf{Idem}_K^{op}$ are inverse equivalences of categories, where $LC(X)$ is the $K$-algebra of locally constant functions $X\to K$.

It follows immediately from this result that if $G$ is a profinite group (which can be thought of as a group object in $\mathbf{Stone}$) then $LC(G)$ is a cogroup object in $\mathbf{Idem}_K$. But $\mathbf{Idem}_K$ is closed under colimits of $K$-algebras, and in particular closed under tensor products of $K$-algebras.  Thus $LC(G)$ is a cogroup object in $K$-algebras, and so its spectrum (whose underlying space is $G$) is a group scheme.

Here, then, is a proof that $LC$ and $\mathrm{Spec}$ are inverses.  First, $LC(X)$ is always generated by idempotents (any locally constant function takes finitely many values by compactness, and so is a linear combination of characteristic functions of clopen sets).  Second, if $A$ is a $K$-algebra generated by idempotents, note that if $P\subset A$ is a prime ideal, then for each idempotent $i\in A$, either $i\in P$ or $1-i\in P$ (but not both).  If $I\subseteq P$ is the ideal generated by the idempotents in $P$, then, every idempotent maps to either $0$ or $1$ in $A/I$, and hence every element of $A$ maps to an element of $K$ in $A/I$.  Thus $A/I\cong K$, which implies $P=I$ and $P$ is maximal with residue field $K$.  It follows that a prime ideal is determined by the idempotents it contains, which implies $\operatorname{Spec} A$ is totally disconnected and therefore does indeed give an object of $\mathbf{Stone}$.
Moreover, there is now a natural map $f:A\to LC(\operatorname{Spec} A)$: any element $a\in A$ determines a function $\operatorname{Spec} A\to K$ by taking its image in each residue field.  This function is locally constant if $a$ is idempotent, and hence locally constant for arbitrary $a$.  This map $f$ is surjective since its image contains all idempotents of $LC(\operatorname{Spec} A)$ (for any clopen subset of $\operatorname{Spec} A$, there is an idempotent of $A$).  The kernel of $f$ is the intersection of all prime ideals of $A$, i.e. the nilradical.  To prove this is $0$ (i.e., $A$ is reduced), note that any element of $A$ is a linear combination of idempotents.  Moreover, these idempotents can be "subdivided" to be orthogonal (for instance, if $e$ and $f$ are idempotent and $c$ and $d$ are scalars, then $ce+df=ce(1-f)+d(1-e)f+(c+d)ef$, where $e(1-f)$, $(1-e)f$, and $ef$ are orthogonal idempotents).  So any $a\in A$ has the form $\sum c_ie_i$ for some nonzero elements $c_i\in K$ and orthogonal idempotents $e_i$.  But then if $b=\sum c_i^{-1}e_i$, we have $a^2b=a$.  So if $a^2=0$, then $a=0$, which implies $A$ is reduced.
So, we have proved that $LC \circ \operatorname{Spec}$ is naturally isomorphic to the identity.  The natural isomorphism for the other composition is just the natural homeomorphism $X\to \operatorname{Spec} LC(X)$ from the previous question which you mentioned, sending $x$ to the ideal of functions vanishing at $x$.
