Contour integrals are integrals of complex-valued functions over a contour's worth of complex numbers in the complex plane $\Bbb C$, whereas line integrals are integrals of either scalar functions or vector-valued functions over a curve in $n$-dimensional space $\Bbb R^n$.
If you want to understand contour integrals, knowing about complex numbers is a must, so make sure you are familiar with them. There is a very important and special difference between $\Bbb R$ and $\Bbb C$ that occurs very soon when learning complex analysis.
With real functions $\Bbb R\to\Bbb R$, having a derivative
$$f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h} $$
means it's called differentiable. The class of continuous functions is $C^0$, and the strictly smaller subclass of differentiable functions is $C^1$. A stronger property still is being twice-differentiable, which means being in $C^2$. Indeed for every natural number $n$, the class $C^{n+1}$ is strictly contained inside $C^n$. The intersection $C^\infty$ is the class of smooth functions, those which are infinitely-differentiable. A strictly stronger property than $C^\infty$ is real-analytic, which means admits a locally convergent power series representation. These are $C^\omega$ functions.
With complex-valued functions $f:\Bbb C\to\Bbb C$, the derivative $f'(z)$ is defined by the same limit as before but with $h\to0$ occurring within $\Bbb C$ (so in particular it may approach $0$ in the complex plane from any direction). If $f'(z)$ exists we say $f$ is complex-differentiable. The special fact here is that if $f$ is once complex-differentiable, then it is infinitely differentiable, and moreover it is also complex-analytic (now "locally" means in a neighborhood of a point in the complex plane, instead of a neighborhood in the real line). Since this is so special, we have a special word for being complex-differentiable/analytic, which is holomorphic.
In real variable calculus, we have a substitution rule telling us that
$$\int_{u=u(a)}^{u=u(b)}f(u)\,{\rm d}u=\int_a^b f(u(t))u'(t)\,{\rm d}t.$$
This is true even if $u:[a,b]\to[u(a),u(b)]$ is not injective and in some parts "back-tracks." This hints at path-independence (and also hints at orientation of intervals, since even if $a<b$ we could have $u(b)<u(a)$ if $u$ reverses orientation).
Analogously, given a differentiable path $\gamma:[0,1]\to\Bbb C$, the path integral $\int_\gamma f(z)\,{\rm d}z$ is defined to be
$$\int_\gamma f(z)\,{\rm d}z=\int_0^1f(\gamma(t))\gamma'(t)\,{\rm d}t.$$
Note that $\gamma$ is complex-valued. If instead we make $\gamma$ piecewise differentiable, then we would have to break this definition up into pieces as appropriate.
One proves this quantity is independent of how one uses $\gamma$ to parametrize a curve $\gamma([0,1])$ if $f$ is holomorphic. Moreover, if $D$ is some simply-connected domain on which $f$ is holomorphic, then $\int_\gamma f(z)\,{\rm d}z$ is the same for all paths $\gamma$ between two given points that remains entirely within $D$. In particular, if $\gamma$ is a loop from a point back to itself, we use the notation $\oint_\gamma f(z)\,{\rm d}z$, and it is $0$.
If $D$ is not simply connected (if it has loops that cannot be contracted to a point within $D$, like an annular region or any simply-connected domain with points deleted from it) then this is not true, for instance $\frac{1}{z}$ is not defined at $0$ and $\oint_\gamma \frac{1}{z}\,{\rm d}z=2\pi i$ if $\gamma$ is a loop that goes once around $0$ in the counterclockwise direction. This stems from the fact that $\log z$ goes from $0$ to $2\pi i$ as we go around the unit circle from $1$ to itself counterclockwise.
To evaluate contour integrals $\oint_\gamma f(z)\,{\rm d}z$, one uses "residue calculus," which is a part of the branch of mathematics called complex analysis (some sources call it complex variables too). In order to learn more, you'll want to get a text, or take a class, or google around for scattered notes and videos on complex analysis (it's certainly possible to learn for free online).
From your main definition of the Bernoulli numbers, for $ x\in\mathcal{B}\left(0,2\pi\right) $, multiplying both sides by $ \mathrm{e}^{x} $, we have : \begin{aligned}\frac{x\,\mathrm{e}^{x}}{\mathrm{e}^{x}-1}&=\left(\sum_{n=0}^{+\infty}{\frac{B_{n}}{n!}x^{n}}\right)\left(\sum_{n=0}^{+\infty}{\frac{x^{n}}{n!}}\right)\\ \iff\ \ \ \ \ \ \ \ \ \ \ \ \ \frac{-x}{\mathrm{e}^{-x}-1}&=\sum_{n=0}^{+\infty}{\frac{1}{n!}\left(\sum_{k=0}^{n}{\binom{n}{k}B_{k}}\right)x^{n}}\\ \iff\sum_{n=0}^{+\infty}{\frac{\left(-1\right)^{n}B_{n}}{n!}x^{n}}&=\sum_{n=0}^{+\infty}{\frac{1}{n!}\left(\sum_{k=0}^{n}{\binom{n}{k}B_{k}}\right)x^{n}}\end{aligned}
Thus, for all $ n\in\mathbb{N} $, we have : $$ \sum_{k=0}^{n}{\binom{n}{k}B_{k}}=\left(-1\right)^{n}B_{n} $$
Now : \begin{aligned} \sum_{r=k}^{n-1}{\binom{n}{r}\binom{r}{k}B_{r-k}}&=\binom{n}{k}\sum_{r=k}^{n-1}{\binom{n-k}{r-k}B_{r-k}}\\ &=\binom{n}{k}\sum_{r=0}^{n-k-1}{\binom{n-k}{r}B_{r}}\\ &=\binom{n}{k}\sum_{r=0}^{n-k}{\binom{n-k}{r}B_{r}}-\binom{n}{k}B_{n-k}\\ &=\binom{n}{k}\left(-1\right)^{n-k}B_{n-k}-\binom{n}{k}B_{n-k}\\ \sum_{r=k}^{n-1}{\binom{n}{r}\binom{r}{k}B_{r-k}}&=\left(\left(-1\right)^{n-k}-1\right)\binom{n}{k}B_{n-k}\end{aligned}
Let $ k\in\left[\!\left[0,n-2\right]\!\right] $, If $ k $ is such that $ n-k $ is even than $ \left(-1\right)^{n-k}-1 =0 $, but if $ k $ is such that $ n-k $ is odd than $ B_{n-k}=0 $, because besides $ B_{1} $, all $ B_{n} $ such that $ n $ is odd are equal to $ 0 $. Thus, in all cases $ \left(\left(-1\right)^{n-k}-1\right)B_{n-k}=0 $ for all $ k\in\left[\!\left[0,n-2\right]\!\right] $. Hence the result.
Best Answer
Essentially, it relies on the fact that the derivative of a nice odd functions is even and derivative of nice even functions is odd. The Bernoulli polynomials are odd and even alternatingly about $x=\dfrac12$ because of the above reason, and to start of with $B_0(x) = 1$ is an even function about $x=\dfrac12$. Hence, $B_1(x)$ is odd about $x=\dfrac12$, $B_2(x)$ is even about $x= \dfrac12$ and in general $B_n(x)$ is odd or even about $x= \dfrac12$ depending on whether $n$ is odd or even.