I am quite positive the method delineated above is correct.
Indeed, it is correct. It's a standard keyhole contour integration path
$\hspace{4cm}$
with the two contributing parts above and below the branch cut on the positive real axis. The change of direction and the branch of the square root each contribute a factor $-1$ for the part below the real axis, so that part of the contour integral equals the part above the real axis, whence the integral is $\dfrac{1}{2}\cdot 2\pi i$ times the sum of the residues.
Another method - simpler in a way, since it requires only the computation of one residue - is to use the boundary of an angular sector with angle $2\pi/3$ as the contour, similar to
$\hspace{4cm}$
but with a greater angle of $2\pi/3$ so that the denominator attains the same values on the rays, and with a small circular arc around the branch point of $\sqrt{z}$ in $0$. The square root produces a factor of $e^{\pi i/3}$ then, due to $\sqrt{e^{2\pi i/3}x} = e^{\pi i/3}\sqrt{x}$, the direction of the ray produces a factor $e^{2\pi i/3}$, due to $d(e^{2\pi i/3}x) = e^{2\pi i/3}\,dx$, and the orientation produces a factor of $-1$ in relation to the part of the contour integral on the real axis. The product of these factors is $1$, so in the limit, the contour integral is again twice the integral over the positive real axis.
The problem is obtaining the correct value for the sum of the residues. With that I'd appreciate help.
Since the value of the integral is $\dfrac{\pi}{3}$, the sum of the residues should be $-\dfrac{i}{3}$, and not $-\dfrac{i}{6}$. And it is. Choosing the branch of the square root with $0 < \arg \sqrt{z} < \pi$ on $\mathbb{C}\setminus [0,\infty)$, we find
$$\operatorname{Res} \left(\frac{\sqrt{z}}{z^3+1}; e^{i\varphi}\right) = \frac{e^{i\varphi/2}}{3e^{2i\varphi}} = \frac{1}{3}e^{-3i\varphi/2}$$
for $e^{i\varphi} = -1$.
In $e^{i\pi (2k+1)/3}, \; k \in \{0,1,2\}$, we thus have
$$\operatorname{Res} \left(\frac{\sqrt{z}}{z^3+1}; e^{i\pi (2k+1)/3}\right) = \frac{1}{3} e^{- i\pi (2k+1)/2} = \frac{(-1)^k}{3i},$$
and the sum of the residues is $\frac{1}{3i}$, whence
$$\int_0^\infty \frac{\sqrt{x}}{x^3+1}\,dx = \pi i \cdot \frac{1}{3i} = \frac{\pi}{3}.$$
The images for the contours shamelessly taken from this and this answer on the site.
Let's agree explicitly that "$\log$" refers to the branch of logarithm defined on $\mathbf{C}\setminus(-\infty, 0]$ whose imaginary part is between $-\pi i$ and $\pi i$, and that "$f(z) \leq a$" means "both $a$ and $f(z)$ are real, and $f(z) \leq a$".
If $f$ is holomorphic in some region $U$, then $\log(f)$ is holomorphic at $z$ in $U$ provided $f(z)$ does not lie on the branch cut, i.e., "$f(z) \leq 0$" is false.
In your example, $f(z) = z^{2} + a^{2}$ is holomorphic on all of $\mathbf{C}$, so $\log f$ is holomorphic on the twice-cut plane, from which the imaginary intervals $i(-\infty, -a]$ and $i[a, \infty)$ have been removed. These intervals are precisely the set of $z$ for which $z^{2} + a^{2} \leq 0$. In fancier language, they constitute the preimage of the cut $(-\infty, 0]$ under $f$.
The issue in (2) is that a small circle $C$ centered at $ib$ (with $|b| > a$) crosses the "cuts" of $\log(f)$. The image of $C$ under $f$ is a closed curve (not a circle) "centered on" the negative real axis, so $f(C)$ crosses the branch cut of $\log$. Locating $-b^{2} + a^{2}$ in the $z$ plane, relative to the branch cuts of $\log(f)$, is immaterial: We're not evaluating $\log(f)$ near $-b^{2} + a^{2}$, we're evaluating $\log$ itself. $\ddot\smile$
To see what's going on with the values of $\log(f)$ "near" each imaginary cut, consider points $z = re^{i\phi}$ with $r > a$ and $\phi$ "close to" $\pm\pi/2$:
$$
z^{2} + a^{2}
= r^{2} e^{2i\phi} + a^{2}
= (r^{2} \cos(2\phi) + a^{2}) + ir^{2} \sin(2\phi).
$$
If $\phi$ is a bit smaller than $\pm\pi/2$, then $\sin(2\phi) > 0$. Consequently, $z^{2} + a^{2}$ has "small" positive imaginary part, so $\log(z^{2} + a^{2})$ has imaginary part close to $\pi i$.
Similarly, if $\phi$ is a bit larger than $\pm\pi/2$, then $\sin(2\phi) < 0$ and $\log(z^{2} + a^{2})$ has imaginary part close to $-\pi i$.
Best Answer
The reason that it is interesting to calculate the residue of $\frac 1z$ at $0$ (or equivalently, the counterclockwise integral $\oint_{|z| = 1} \frac 1z dz$) is that it cannot be (directly) calculated using an antiderivative.
If $\gamma$ is a curve in $\Bbb C$ that starts at $a \in \Bbb C$ and ends at $b \in \Bbb C$ and if there exists a function $F(z)$ such that $F$ is differentiable at all points in $\gamma$ with $f(z) = \frac d{dz}F(z)$, then we have $$ \int_\gamma f(z)\,dz = F(b) - F(a). $$ It follows that if $\gamma$ is a closed contour (so that $a = b$), then we have $\int_\gamma f(z)\,dz = F(a) - F(a) = 0$. In other words: if we know that there is an anti-derivative of $f$ that is globally defined along the contour $|z| = 1$, then it necessarily follows that its reside at $0$ is $0$.
That said, we can use the antiderivative to compute the residue if we split the desired integral into parts. Let $\gamma_1$ denote the path along $|z| = 1$ from $1$ to $-1$, and let $\gamma_2$ denote the path along $|z| = 1$ from $-1$ to $1$, both taken counterclockwise. We have $$ \oint_{|z| = 1}\frac 1{z}\,dz = \int_{\gamma_1} \frac 1zdz + \int_{\gamma_2} \frac 1z dz. $$ We now consider two different antiderivatives for $\frac 1z$ corresponding to different branch cuts. Define $\log^1,\log^2$ such that $$ \log^1(e^{i \theta}) = i\theta, \quad \theta \in [-\pi/2,3 \pi/2);\\ \log^2(e^{i \theta}) = i\theta, \quad \theta \in [\pi/2, 5\pi/2). $$ We then have $$ \int_{\gamma_1} \frac 1zdz = \log^1(-1) - \log^1(0) = \pi i - 0 = \pi i,\\ \int_{\gamma_2} \frac 1z dz = \log^2(0) - \log^2(-1) = 2 \pi - \pi i = \pi i. $$
Regarding your edited question: your definition $$ \log(re^{i\theta}) = \{\log r + i(\theta + 2 \pi k) : k \in \Bbb Z\} $$ is consistent with the definition $$ \log(z) = \left\{\int_{\gamma}\frac 1z \,dz : \gamma \text{ is a contour from } 1\ \text{to}\ z\right\}. $$ It is indeed the case that the multiple of $k$ corresponds to the contribution of the residue at $z = 0$.