Actually, we do need to worry about the pole at $x=1$ if we intend to use contour integration, for reasons that are a bit subtle. I will demonstrate below.
The standard way to treat integrals of rational functions times logs over $[0,\infty)$ in complex analysis is to consider a keyhole contour, and an integral over that contour of the next higher power of log. In this case, the integral is
$$\oint_C dz \frac{\log^2{z}}{z^3-1}$$
$C$, however, is a modified keyhole contour about the positive real axis of outer radius $R$ and inner radius $\epsilon$. The modification lies on small semicircular bumps above and below $z=1$ of radius $\epsilon$, and we will consider the limits as $\epsilon \to 0$ and $R\to\infty$.
Let's evaluate this integral over the contours. There are $8$ pieces to evaluate, as follows:
$$\int_{\epsilon}^{1-\epsilon} dx \frac{\log^2{x}}{x^3-1} + i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{\log^2{\left (1+\epsilon e^{i \phi}\right )}}{(1+\epsilon e^{i \phi})^3-1} \\ + \int_{1+\epsilon}^R dx \frac{\log^2{x}}{x^3-1} + i R \int_0^{2 \pi} d\theta \, e^{i \theta} \frac{\log^2{\left (R e^{i \theta}\right )}}{R^3 e^{i 3 \theta}-1} \\ + \int_R^{1+\epsilon} dx \frac{(\log{x}+i 2 \pi)^2}{x^3-1} + i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \frac{(\log{\left (1+\epsilon e^{i \phi}\right )}+i 2 \pi)^2}{(1+\epsilon e^{i \phi})^3-1} \\ + \int_{1-\epsilon}^{\epsilon} dx \frac{(\log{x}+i 2 \pi)^2}{x^3-1} + i \epsilon \int_{2 \pi}^0 d\phi \, e^{i \phi} \frac{\log^2{\left (\epsilon e^{i \phi}\right )}}{\epsilon^3 e^{i 3 \phi}-1} $$
(To see this, draw the contour out, including the bumps about $z=1$.)
As $R \to \infty$, the fourth integral vanishes as $\log^2{R}/R^2$. As $\epsilon \to 0$, the second integral vanishes as it is $O(\epsilon^3)$, while the eighth integral vanishes as $\epsilon \log^2{\epsilon}$. This leaves the first, third, fifth, sixth and seventh integrals, which in the above limits, become
$$PV \int_0^{\infty} dx \frac{\log^2{x} - (\log{x}+i 2 \pi)^2}{x^3-1} + i \frac{4 \pi^3}{3}$$
EDIT
It should be appreciated that, in the fifth, sixth, and seventh integrals, the $i 2 \pi $ factor appears because, on the lower branch of the real axis, we write $z=x \, e^{i 2 \pi}$. In the sixth integral, in fact, $z = e^{i 2 \pi} + \epsilon \, e^{i \phi + 2 \pi}$.
END EDIT
The $PV$ denotes the Cauchy principal value of the integral. As it stands, the integral does not actually converge. Nevertheless, we are not actually considering the integral straight through the pole at $z=1$, but a very small detour around the pole. Thus, in the limit, we get the Cauchy PV. A little rearranging cancels the $\log^2$ term, and we now have two integrals to evaluate:
$$-i 4 \pi \int_0^{\infty} dx \frac{\log{x}}{x^3-1} + 4 \pi^2 PV \int_0^{\infty} \frac{dx}{x^3-1} + i \frac{4 \pi^3}{3}$$
Note we could remove the $PV$ on the first integral because the pole is a removable singularity.
The contour integral is equal to $i 2 \pi$ times the sum of the residues at the poles. The poles here are at $z=e^{i 2 \pi/3}$ and $z=e^{i 4 \pi/3}$. Note that the pole at $z=1$ is not inside the contour $C$ because of the detour around that "pole". It should be appreciated that the poles must have their arguments between $[0,2 \pi]$ because of the way we defined $C$.
In any case, we now have that the above 1D integrals over the positive real line are equal to
$$i 2 \pi \left [\frac{-4 \pi^2/9}{3 e^{i 4 \pi/3}} + \frac{-16 \pi^2/9}{3 e^{i 8 \pi/3}} \right ] = -\frac{4 \pi ^3}{3 \sqrt{3}}+i \frac{20 \pi ^3}{27} $$
Equating real and imaginary parts, we find that
$$ \int_0^{\infty} dx \frac{\log{x}}{x^3-1} = \frac{4 \pi^2}{27} $$
$$ PV \int_0^{\infty} \frac{dx}{x^3-1} = -\frac{\pi}{3 \sqrt{3}} $$
Best Answer
Note: my solution works only for $a>0,\,b\neq0$. Consider the function $$f\left(z\right)=\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}} $$ and the branch of the logarithm corresponding to $-\pi<\arg\left(z\right)\leq\pi.$ Take the keyhole contour and define $\Gamma$ and $\gamma$ respectively the large circumference of radius $R$ and the small circumference of radius $\rho$.
We note that $$\left|\int_{\Gamma}f\left(z\right)dz\right|\leq\frac{\log^{2}\left(R\right)+\pi^{2}}{\left(R-\left|a\right|\right)^{2}-b^{2}}2\pi R\underset{R\rightarrow\infty}{\rightarrow}0 $$ and $$\left|\int_{\gamma}f\left(z\right)dz\right|\leq\frac{\log^{2}\left(\rho\right)+\pi^{2}}{\left|\left(\rho-\left|a\right|\right)^{2}-b^{2}\right| }2\pi\rho\underset{\rho\rightarrow0}{\rightarrow}0. $$ So we have $$2\pi i\left(\textrm{Res}_{z=a+ib}\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}}+\textrm{Res}_{z=a-ib}\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}}\right) $$ $$=\int_{0}^{\infty}\frac{\log^{2}\left(-x+i\epsilon\right)}{\left(-x+i\epsilon-a\right)^{2}+b^{2}}dx-\int_{0}^{\infty}\frac{\log^{2}\left(-x-i\epsilon\right)}{\left(-x-i\epsilon-a\right)^{2}+b^{2}}dx $$ $$\underset{\epsilon\rightarrow0}{\rightarrow}\int_{0}^{\infty}\frac{\left(\log\left(x\right)+i\pi\right)^{2}-\left(\log\left(x\right)-i\pi\right)^{2}}{\left(x+a\right)^{2}+b^{2}}dx $$ $$=4\pi i\int_{0}^{\infty}\frac{\log\left(x\right)}{\left(x+a\right)^{2}+b^{2}}dx $$ and for the other part we have $$\textrm{Res}_{z=a+ib}\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}}+\textrm{Res}_{z=a-ib}\frac{\log^{2}\left(z\right)}{\left(z-a\right)^{2}+b^{2}}=\frac{\log^{2}\left(a+ib\right)-\log^{2}\left(a-ib\right)}{2ib}. $$ Now if we assume that $a>0 $ we have $$\frac{\left(\log\left(\sqrt{a^{2}+b^{2}}\right)+i\arg\left(a+ib\right)\right)^{2}-\left(\log\left(\sqrt{a^{2}+b^{2}}\right)+i\arg\left(a-ib\right)\right)^{2}}{2ib} \tag{1}$$ $$=\frac{2\log\left(\sqrt{a^{2}+b^{2}}\right)\arctan\left(\frac{b}{a}\right)}{b}. $$ Hence
Addendum: the identity holds only if $a>0 $. If we assume $a<0$ from $(1)$ we have