Lemma
Suppose that $w: [a,b] \to \C$ is piecewise continuous, then we have
\begin{equation}
\abslr{\int_{a}^{b} w(t) \ud t} \le \int_{a}^{b} \abs{w(t)} \ud t.
\label{lemma}
\end{equation}
The trick is to treat the integral on the L.H.S. of \eqref{lemma} as a
number.
\begin{align}
\int_{a}^{b} w(t) \ud t &= r_0 e^{i\theta_0} \text{ for some } r \in
\R \text{ and } \theta_0 \in [-\pi,\pi)
\label{trick1}\\
r_0 &= \int_{a}^{b} e^{-i\theta_0} w(t) \ud t
\label{trick2}
\end{align}
Then from \eqref{lemma} and \eqref{trick1}, it suffices to show that
\begin{equation}
r_0 = \abslr{r_0 e^{i\theta_0}} \le \int_{a}^{b} \abs{w(t)} \ud t.
\label{new_goal1}
\end{equation}
Since \eqref{trick2} consists of $e^{-i\theta_0}$, which is absent
on the R.H.S. of \eqref{lemma} and \eqref{new_goal1}, we add it back.
Thus, we need to show
\begin{equation}
r_0 \le \int_{a}^{b} \abslr{e^{-i\theta_0} w(t)} \ud t.
\label{new_goal2}
\end{equation}
Looking at \eqref{trick2} again, we’re almost there! Using elementary
properties of complex numbers and definite integrals for real-valued
functions and the fact/definition that
\begin{equation}
\Re\left(\int_{a}^{b} w(t) \ud t\right) = \int_{a}^{b} \Re[w(t)] \ud
t,
\label{Re-int}
\end{equation}
we can write
\begin{equation}
\begin{aligned}
r_0 &= \Re\left(\int_{a}^{b} e^{-i\theta_0} w(t) \ud t\right) \\
&= \int_{a}^{b} \Re[e^{-i\theta_0} w(t)] \ud t\\
&\le \int_{a}^{b} \abslr{e^{-i\theta_0} w(t)} \ud t.
\end{aligned}
\label{fin}
\end{equation}
Therefore, \eqref{new_goal2} is satisfied, so as \eqref{lemma}.
An upper bound for Legendre polynomials
I have never evaluated
\begin{equation}
P_n(x) = \frac{1}{\pi} \int_0^\pi (x + i \sqrt{1 - x^2}
\cos{\theta})^n \ud\theta,
\label{pnx}
\end{equation}
where $-1 \le x \le 1$ and $n = 0,1,2,\dots$
Applying \eqref{lemma}, one gets
\begin{equation}
\begin{aligned}
P_n(x) &= \frac{1}{\pi} \int_0^\pi (x + i \sqrt{1 - x^2}
\cos{\theta})^n \ud\theta\\
&\le \frac{1}{\pi} \int_0^\pi \ud\theta\\
&= 1
\end{aligned}
\label{crux}
\end{equation}
because
\begin{equation}
\begin{aligned}
&\quad\; \abs{x + i \sqrt{1 - x^2} \cos{\theta}}\\
&= \sqrt{x^2 + (1 - x^2) \cos^2{\theta}}\\
&\le \sqrt{x^2 + (1 - x^2)}\\
&= 1.
\end{aligned}
\label{norm-ub}
\end{equation}