Klein-Gordon propagator integral DISCLAIMER: I edited the question to include the integrals and the picture
I'm stuyding Klein-Gordon field in Peskin & Schroeder An Introduction to Quantum Field Theory There is an integral that I don't see, related to the computation of the propagators, in particular for the K-G field. I'm refering to two steps
$$\langle 0| [\phi(x),\phi(y)] 0\rangle=\int \frac{d^3p}{(2\pi)^3}\frac{1}{2E_p}(e^{-ip\cdot(x-y)}-e^{ip\cdot(x-y)}).\tag{2.54}$$
Now that integral is written as
$$\int \frac{d^3p}{(2\pi)^3} \left\{ \frac{1}{2E_p}e^{-ip\cdot(x-y)}\bigg|_{p_0=E_p}+\frac{1}{-2E_p}e^{-ip\cdot(x-y)}\bigg|_{p_0=-E_p}\right\} $$
Question 1) How can be fixed the vale of $p_0$ to be $\pm E_p$?  It is only notation?
Now it says that it can be written as a $p_0$ integral in the following contour

If $x^0>y^0$ then
$$\int \frac{d^3p}{(2\pi)^3}\int\frac{dp^0}{2\pi i}\frac{-1}{p^2-m^2}e^{-ip\cdot(x-y)}$$
and the contour is closed below. If $x^0<y^0$ the contour is closed above, giving 0 (this i can see it)
Question 2) Why that particular choice of closed contours?
When I had to do any integral with residues theorem, usually they are integrals over $\mathbb{R}$ so that the contour of integration in the complex plane is exactly a semicircle of radius $R$ with $R\to \infty$. Now this is not the case, because the contour does not pass throught the entire real line.
Question 3) The semicircles centered at $\pm E_p$ affect the $p_0$ integration?
 A: OK, I have Peskin & Schroeder open in front of me.  They're not saying that $\langle 0|[\phi(x),\phi(y)]|0\rangle$ takes on two different values depending on how you close the contour.  They're saying that the integral given on the last line of equation 2.54
$$\int \frac{d^3p}{(2 \pi)^3}\int \frac{dp^0}{2\pi i} \frac{-1}{p^2 - m^2} e^{-i p \cdot (x - y)}$$
is either equal to $\langle 0|[\phi(x),\phi(y)]|0\rangle$ or zero, depending on whether $x^0 > y^0$ or $x^0 < y^0$ (which in turn dictates which way you should close the contour).
You can evaluate the integral by adding an arc to it either above or below, making it a closed contour.  But you have to choose the arc such that in the limit that its radius goes to infinity, the integral along the arc goes to zero.  Otherwise, adding the arc would change the value of the integral.  For $x^0 > y^0$ the right choice is to close the contour below.  This encloses both poles, and it follows from the residue theorem that the integral is $\langle 0|[\phi(x),\phi(y)]|0\rangle$.  For $x^0 < y^0$, the right choice is to close the contour above, enclosing no poles, from which it follows that the integral is zero.
Therefore in the general case, the integral is $\theta(x^0 - y^0)\langle 0|[\phi(x),\phi(y)]|0\rangle$, which is the retarded Green's function.  (Here $\theta$ is the step function.)
