The chain of equalities that you ask about is haphazard. It's the type of arduous sequence that you get when someone is trying to get to a known end result, without knowing how to get there efficiently.
Here is how it should be done:
In preparation:
$$ v = \frac{ds}{dt} \ \Leftrightarrow \ ds = v \ dt \tag{1} $$
$$ a = \frac{dv}{dt} \ \Leftrightarrow \ dv = a \ dt \tag{2} $$
Going from (3) to (6):
First (1) is used to change the differential from $ds$ to $dt$, with corresponding change of limits. Next (2) is used - with change of limits - to arrive at (6).
$$ \int_{s_0}^s a \ ds \tag{3} $$
$$ \int_{t_0}^t a \ v \ dt \tag{4} $$
$$ \int_{t_0}^t v \ a \ dt \tag{5} $$
$$ \int_{v_0}^v v \ dv \tag{6} $$
It follows:
$$ \int_{s_0}^s a \ ds = \tfrac{1}{2}v^2 - \tfrac{1}{2}v_0^2 \tag{7} $$
With the above prepared: take $F=ma$, and on both sides integrate with respect to position coordinate:
$$ \int_{s_0}^s F \ ds = \int_{s_0}^s m \ a \ ds \tag{8} $$
Use (7) to process the right hand side:
$$ \int_{s_0}^s F \ ds = \tfrac{1}{2}mv^2 - \tfrac{1}{2}mv_0^2 \tag{9} $$
The sequence of steps above highlights an underlying symmetry; $v=ds/dt$ and $a=dv/dt$ are the same pattern.
The reason that the integral $\int_{s_0}^s a \ ds$ can be processed is that acceleration $a$ as a function of time and position $s$ as a function of time are connected by differentiation.
The integral should be processed as an integral with a starting point and an end point, because Energy is defined in terms of difference of Energy. The choice of zero point of energy is an arbitrary choice. In any calculation in which energy is used it is difference of energy between two states that counts, not the value itself.