How is electric potential related to potential energy and work in electrostatics? In Section 2.3.1 of Griffiths' text on electrodynamics he defines the scalar potential $V$ as $$V(\mathbf{r})=-\int_{\mathcal{O}}^{\mathbf{r}}\mathbf{E}\cdot d\mathbf{l}.$$
In Section 2.3.2 he states

The word ''potential'' is a hideous misnomer because it inevitably reminds you of potential energy.  This is particularly insidious, because there is a connection between ''potential'' and ''potential energy'', as you will see in Sect. 2.4.  I'm sorry that it is impossible to escape this word.  The best I can do is to insist once and for all that ''potential'' and "potential energy" are completely different terms and should, by all rights, have different names.

In Section 2.4 he shows that the work required to move a test charge $Q$ from $\mathbf{a}$ to $\mathbf{b}$ in the presence of a collection of source charges is given by
$$W=\int_{\mathbf{a}}^{\mathbf{b}}\mathbf{F}\cdot d\mathbf{l}=-Q\int_{\mathbf{a}}^{\mathbf{b}}\mathbf{E}\cdot d\mathbf{l}=Q[V(\mathbf{b})-V(\mathbf{a})].$$
And this implies that $$V(\mathbf{b})-V(\mathbf{a})=\frac{W}{Q},$$
so that the scalar potential difference between $\mathbf{a}$ and $\mathbf{b}$ is equal to the work per unit charge to carry a particle from $\mathbf{a}$ to $\mathbf{b}$.  In particular, if we wish to bring $Q$ in from far away and stick it at the point $\mathbf{r}$, the work we must do is $$W=Q[V(\mathbf{r})-V(\infty)],$$ so if the reference point is infinity $$W=QV(\mathbf{r}).$$  He then states

In this sense, potential is potential energy (the work it takes to create a system) per unit charge (just as the field is the force per unit charge).

I find this very confusing.  I thought that energy was the ability to do work, and that work is defined as the line integral $$W=\int_{\mathbf{a}}^{\mathbf{b}}\mathbf{F}\cdot d\mathbf{l}.$$  If these definitions are correct, then $V(\mathbf{r})=W/Q$ doesn't seem to have anything to do with energy.
If, on the other hand, energy is "the work it takes to create a system", then it is correct to say that the scalar potential is the potential energy per unit charge required to create the system.  But if energy is "the work it takes to create a system", I don't see how this definition is related to "the ability to do work".
I apologize for the obtuse question.  I am from a mathematical background, and am not familiar with energy and work beyond a very elementary level, and would really appreciate any help in understanding this.
I think my question can be phrased more concisely as: what is energy in the context of electrostatics, and how does it relate to work?
 A: I would advise you to forget both of these supposed definitions:

I thought that energy was the ability to do work...


...energy is "the work it takes to create a system"...

These are things we tell people who don't know any math, to give them a vague conceptual inkling of what energy is. They are imprecise and you cannot use them with any benefit in calculations.
When you know math, energy is defined by equations. There are some very general definitions in more advanced physics, but at the level of elementary electrostatics,1 you're likely to find different definitions for different types of energy. One such definition is the electric potential energy, which can be defined (for a single particle at position $\mathbf{r}$ in a static electric field) as
$$U_e(\mathbf{r}) = -\int_{\mathcal{O}}^{\mathbf{r}}\mathbf{F}_e(\mathbf{r})\cdot\mathrm{d}\mathbf{l}$$
Here $\mathbf{F}_e(\mathbf{r})$ is the electric force, $\mathbf{F}_e(\mathbf{r}) = Q\mathbf{E}(\mathbf{r})$. Note that this is physically and mathematically equal to the work required to put the charge at $\mathbf{r}$, given that $\mathcal{O}$ is a reference location (meaning, by definition, that a charge at that point contributes nothing to the potential energy).
From this it's straightforward to conclude that
$$U_e(\mathbf{r}) = QV(\mathbf{r})$$
There's your link between energy and electric potential.

1 Griffiths' book is not exactly an elementary one, but what you're asking about doesn't involve any advanced concepts so I'll stick to the basics so as to avoid confusing readers of this answer more than necessary.
A: work is defined as the amount of energy required to move a mass form point $a$ to $b$ against an opposing force.
the force acting on a charge $q$ in field $\mathbf{E}$
is simply $\mathbf{f}=q\mathbf{E}$.
Hence the work done is:
$W = \int_a^b{q\mathbf{E}\cdot dl}$
now $q$ is a test charge.
Thus the potential is simply:
$\phi=\frac{W}{q}$
