I) In this answer, we would like to relax the conventional definition of a conservative force to include, e.g., the Lorentz force.
II) The standard definition of a conservative force is given on Wikipedia (October 2013) roughly as follows:
A force field ${\bf F}={\bf F}({\bf r})$ is called a conservative force if it meets any of these three equivalent conditions:
The force can be written as the negative gradient of a potential $U=U({\bf r})$:
$${\bf F} ~=~ - {\bf \nabla} U. \tag{1} $$
Equivalently, condition $(1)$ means that the one-form $\phi:={\bf F}\cdot \mathrm{d}{\bf r}$ is exact: $\phi=-\mathrm{d}U$, where the exterior derivative is $\mathrm{d}:=\mathrm{d}{\bf r}\cdot{\bf \nabla}$.
The position space is simply connected, and the curl of ${\bf F}$ is zero:
$$ {\bf \nabla} \times {\bf F} ~=~ {\bf 0}. \tag{2} $$
Equivalently, condition $(2)$ means that the one-form $\phi:={\bf F}\cdot \mathrm{d}{\bf r}$ is closed: $\mathrm{d}\phi=0$.
There is zero net work $W$ done by the force ${\bf F}$ when moving a particle through a closed curve ${\rm r}: S^1 \to \mathbb{R}^3$ that starts and ends in the same position:
$$W ~\equiv~ \oint_{S^1} \!\mathrm{d}s~ {\bf F}({\bf r}(s)) \cdot {\bf r}^{\prime}(s) ~=~ 0. \tag{3} $$
We stress that the parameter $s$ does not have to be actual time $t$. In fact, time $t$ doesn't enter conditions (1-3) at all. The curve in condition $(3)$ could be any virtual loop. In particular, the curve and its parametrization $s$ do, in principle, not have to reflect how an actual point particle would travel along a trajectory at a certain pace determined by some equations of motion, let alone move forward in time.
III) Now recall that a velocity dependent potential $U=U({\bf r},{\bf v},t)$ of a force ${\bf F}$ by definition satisfies
$${\bf F}~=~\frac{\mathrm d}{\mathrm dt} \frac{\partial U}{\partial {\bf v}} - \frac{\partial U}{\partial {\bf r}}, \qquad {\bf v}~=~\dot{\bf r},\tag{4} $$
cf. Ref. 1. Next, define the potential part of the action as
$$S_{\rm pot}[{\bf r}]~:=~\int_{t_i}^{t_f} \!\mathrm{d}t~U({\bf r}(t),\dot{\bf r}(t),t),\tag{5}$$
and note that eq. $(4)$ can be rewritten with the help of a functional derivative as
$$F_i(t)~=~-\frac{\delta S_{\rm pot}}{\delta x^i(t)}, \qquad i~\in~\{1,2,3\}.\tag{6} $$
Technically, at this point, we need to impose pertinent boundary conditions (BC) (e.g. Dirichlet BC) at initial and final times, $t_i$ and $t_f$, respectively, in order for the functional derivative $(6)$ to exist. These BC are implicitly assumed from now on.
We dismiss the possibility that one would like to call a force with explicit time dependence for a conservative force. Let us, therefore, drop explicit time dependence from now on. However, see this Phys.SE post.
IV) Seen in the light that velocity-dependent potentials $(4)$ are extremely useful in Lagrangian formulations, it is tempting to generalize the notion of a conservative force in the following non-standard way:
A velocity dependent force field ${\bf F}={\bf F}({\bf r},{\bf v})$ is called a conservative force if it meets any of these three equivalent conditions:
The force can be written as the negative functional gradient of a potential action $S_{\rm pot}[{\bf r}]=\int_{t_i}^{t_f} \!\mathrm{d}t~U({\bf r}(t),\dot{\bf r}(t))$:
$${\bf F} ~=~ -\frac{\delta S_{\rm pot}}{\delta {\bf r}}
~\equiv~\frac{\mathrm d}{\mathrm dt} \frac{\partial U}{\partial {\bf v}} - \frac{\partial U}{\partial {\bf r}} .\tag{1'} $$
Equivalently, condition $(1 \text{'})$ means that the one-form $\Phi:=\int_{t_i}^{t_f}\!\mathrm{d}t~ F_i(t)\mathrm{d}x^i(t)$ is exact in path space: $\Phi=-\mathrm{d}S_{\rm pot}$, where the exterior derivative is $\mathrm{d}:=\int_{t_i}^{t_f}\!\mathrm{d}t~ \mathrm{d}x^i(t)\frac{\delta}{\delta x^i(t)}$.
The position space is simply connected, and the force ${\bf F}$ satisfies a closedness condition wrt. functional derivatives
$$ \frac{\delta F_i(t)}{\delta x^j(t^{\prime})}
~=~[(i,t) \longleftrightarrow (j,t^{\prime})]. \tag{2'} $$
Equivalently, condition $(2 \text{'})$ means that the one-form $\Phi:=\int_{t_i}^{t_f}\!\mathrm{d}t~ F_i(t)\mathrm{d}x^i(t)$ is closed in path space: $\mathrm{d}\Phi=0$. The equivalent Helmholtz conditions [2] wrt. partial and total derivatives read
$$ \frac{\partial F_i}{\partial x^j}
-\frac{1}{2}\frac{\mathrm d}{\mathrm dt}\frac{\partial F_i}{\partial v^j}
~=~[i \longleftrightarrow j], \qquad
\frac{\partial F_i}{\partial v^j}~=~-[i \longleftrightarrow j].$$
The following integral $(3 \text{'})$ over a two-cycle ${\rm r}: S^2 \to \mathbb{R}^3$ vanishes always:
$$ \oint_{S^2}\!\mathrm{d}t \wedge \mathrm{d}s~ {\bf F}({\bf r}(t,s),\dot{\bf r}(t,s)) \cdot {\bf r}^{\prime}(t,s) ~=~ 0. \tag{3'}$$
Here, a dot and a prime mean differentiation wrt. $t$ and $s$, respectively.
With this definition (1'-3') of a conservative force, then, e.g. the Lorentz force and the Coriolis force become conservative forces, while the friction force ${\bf F}=-k {\bf v}$ will stay a non-conservative force, cf. this and this Phys.SE answers.
It should be said that there are straightforward generalizations of conditions (1'-3'):
Firstly one may allow the force ${\bf F}={\bf F}({\bf r}, {\bf v}, {\bf a}, {\bf j},\ldots)$ to depend on acceleration, jerk, etc.
Secondly, one can generalize to generalized positions $q^i$, generalized velocities $\dot{q}^i$, and generalized forces $Q_i$, etc.
Finally, let us mention that this construction (1'-3') is, in spirit, related to the inverse problem for Lagrangian mechanics.
References:
H. Goldstein, Classical Mechanics, Chapter 1.
H. Helmholtz, Ueber die physikalische Bedeutung des Prinzips der kleinsten
Wirkung, J. für die reine u. angewandte Math. 100 (1887) 137.