The velocity of an S-wave is mainly dependent on two factors:
1. Elasticity/Rigidity called Shear modulus
..of the medium(rock) it travels through. The formula is:
Vs = square root(shear modulus/density). Therefore, when shear modulus is high and density is low, the velocity will be high.
It´s the same with the P wave, however, because it is a compressional wave, there is an additional factor (bulk modulus or compressibility, which also explains why P-waves can travel through liquid/gas, when S-wave cannot).
Back to your questions.
a. Yes, the velocity overall increases for both P and S waves from the surface to the core. At the core, (outer) S waves stops propagating and P waves continues with almost half the velocity as in the mantle (because shear modulus is lower, and density is higher).
b. See shear modulus. In general, the velocity increases when the force (stress) is high, and the strain in the rock is low (rigidity).
c. From the surface to the outer core, there seems to be a correlation. However, as argued above, if density goes up, then shear modulus have to go even more up, in order to increase the velocity.
d. Correct, generally decreases with high temperature, and increases with low temperature.
e. Yes, indeed. Composition will control both shear modulus and density, together with pressure and temperature.
Actually, all boundaries (discontinuities) from the surface to the outer core increases velocity abruptly. It is first when it reaches the outer core, the velocity drops.