What motivates the term "State function"? What motivates the term "State function"? Or,in other terms, what is the relation between, potential theory, gradient fields and exact and inexact differentials?
 A: A rigorous answer would require a good chunk of a calculus course. Assuming that you are quite familiar with exact differentials, the idea behind a State function is that, given certain conditions (coordinates over a manifold), the scalar value of the State function is always the same. That is, if I have a quantity $S$ that depends on $T$, then $S$ is a state function if $S$ only depends on $T$, and not on the way you got to $T$. If you allow, in this oversimplified picture, the temperature $T$ to fully characterise your physical states, then $S$ depends only on the actual state of your system, hence $S$ is a State function.
Mathematically, the property of not depending on the path that leads to the state $T$ translates into the notion of exact differential. If $\gamma$ is any closed path that starts at $T$ (and ends at $T$, so perhaps it is now best to imagine that the state $T$ is an element of a multidimensional manifold rather than just $\mathbb R$), you have
$$\oint_\gamma\text d S = S(T)-S(T) = 0$$
provided that $S$ is a state function. Conversely, if you have a 1-form $\alpha$ for which
$$\oint_\gamma\alpha = 0$$
for any closed curve $\gamma$, then there exists a scalar-valued function $f$ for which $\alpha =\text df$. You can then call $f$ the potential of the field $\alpha$, which has the properties of a State function. 
