Daniel Fischer provided most of the information (including Edwards' use of $\,\operatorname{Li}(x)$ instead of $\,\operatorname{li}(x)$ with the possible confusion with the polylogarithm $\operatorname{Li}_s(x)$) but let's add some details and generalities.
Concerning your second question the idea is that :
\begin{align}
\lim_{\epsilon\to 0^+}\left[\int_{0}^{1-\epsilon}\frac{dz}{\log z}+\int_{C_{\epsilon}}\frac{dz}{\log z}+\int_{1+\epsilon}^\infty\frac{dz}{\log z}\right]&=P\int_{0}^\infty\frac{dz}{\log z}+\lim_{\epsilon\to 0^+}\int_{C_{\epsilon}}\frac{dz}{\log z}\\
&=\operatorname{li}(x) -\left(i\pi\;\underset{z=1}{\operatorname{Res}}\frac 1{\log z}\right)\\
&=\operatorname{li}(x) -i\pi\\
\end{align}
where the integral representation of the logarithmic integral was replaced by $\operatorname{li}(x)$ while the integral over the little half-circle $C_\epsilon$ is of course minus the integral over the contour of radius $\epsilon$ from $\,\theta=0$ to $\theta=\phi\,$ (with $\phi=\pi$ here). At the limit $\,\epsilon\to 0$ this last integral converges to $\;\displaystyle i\,\phi\;\underset{z=1}{\operatorname{Res}}\frac 1{\log z}\,$ as proved in the third part of this answer.
Coming to your first question let's notice that the logarithmic integral is defined as a Cauchy principal value around $1$. The $-i\pi\,$ is a term (kind of adjustment) that appeared from the contour integration because of the (half)-singularity at $z=1$ and is not linked to $\;\operatorname{li}(0)=0$.
To make this clearer and since this way of 'cutting the pole in two parts' (i.e. the case $\phi=\pi$) appears quite often let's consider the whole contour closed by a half-circle of radius $R$ on the upper complex plane. We will distinguish these three contours $C$,
suppose that $f(z)$ is analytic in the upper half-plane (including the real line) except at simple poles and that the contribution of the upper half circle goes to $0$ as $R\to +\infty$.
We may then try to compute $\;\displaystyle I:=P\int_{-\infty}^\infty f(z)\;dz\;$ using these three contours :
a) The '$z_0$ outside' case was considered earlier. The contour integral would return at the limit $\epsilon\to 0$ and $R\to +\infty$ :
$$I-\pi \,i\;\underset{z=z_0}{\operatorname{Res}}f(z)=2\,\pi\,i\sum_{z_i\;\text{inside}\;C} \;\underset{z=z_i}{\operatorname{Res}}f(z)$$
b) Here $z_0$ is inside the contour and we will get $$I+\pi \,i\;\underset{z=z_0}{\operatorname{Res}}f(z)=2\,\pi\,i\sum_{z_i\;\text{inside}\;C} \;\underset{z=z_i}{\operatorname{Res}}f(z)$$
$\quad$since $z_0$ appears in the sum at the right $\;I\,$ will be the same than in a).
c) Imagine that the residue for a pole $z_0$ on a line of the contour simply counts as a half-residue then :
$$I=2\,\pi\,i\left[\sum_{z_i\;\text{inside}\;C} \;\underset{z=z_i}{\operatorname{Res}}f(z)+\frac 12\underset{z=z_0}{\operatorname{Res}}f(z)\right]$$
$\quad$in harmony with a) and b).
$\quad$We may generalize this last formula :
For every residue of simple pole $c_j$ on the contour we replace the $2\,\pi$ constant of the residue theorem by the angle $\phi_j$ between the outgoing and incoming tangent lines at $c_j$ (if these tangents exist) to get :
$$I=2\,\pi\,i\,\sum_{z_i\;\text{inside}\;C} \;\underset{z=z_i}{\operatorname{Res}}f(z)+\sum_{c_j\;\text{on}\;C} \phi_j\;i\;\underset{z=c_j}{\operatorname{Res}}f(z)$$
This third method should make things easier to remember and to compute!
Let's evaluate $\;I(\phi):=\lim_{\epsilon\to 0}\int_{C_\epsilon}f(z)\,dz\;$ over a partial circular contour centered at $z_0$ of angle $\phi$ (this picture and part of the discussion is extract from Ablowitz and Fokas' excellent 'Complex Variables').

If $f(z)$ is regular in a neighborhood of $z_0$ except at the simple pole $z_0$ with $\;\underset{z=z_0}{\operatorname{Res}} f(z)=C_{-1}$ then, from its Laurent expansion; $f(z)$ may be rewritten as :
$$f(z)=\frac{C_{-1}}{z-z_0}+g(z)$$
with $g(z)$ analytic in the neighborhood so that :
$$I(\phi)=\lim_{\epsilon\to 0}\int_{C_\epsilon}f(z)\,dz=\lim_{\epsilon\to 0}\int_{C_\epsilon}\frac{C_{-1}}{z-z_0}dz+\lim_{\epsilon\to 0}\int_{C_\epsilon}g(z)\,dz$$
The integral of $g(z)$ will disappear at the limit since $g(z)$ is analytic in the neighborhood and thus $|g(z)|<M=$constant with a path of length $\to 0$.
While we may substitute $\,z=z(\theta)=z_0+\epsilon\,e^{i(\theta+\theta_0)}\,$ in the other integral to get :
$$I(\phi)=\lim_{\epsilon\to 0}\int_{C_\epsilon}\frac{C_{-1}}{z-z_0}dz=\lim_{\epsilon\to 0}\int_0^\phi\frac{C_{-1}}{\epsilon\,e^{i(\theta+\theta_0)}}i\,\epsilon\,e^{i(\theta+\theta_0)}\;d\theta$$
That is $$\boxed{\displaystyle I(\phi)=\lim_{\epsilon\to 0}\int_{C_\epsilon}f(z)\,dz=i\,\phi\;C_{-1}}$$