How do diffusers turn velocity into pressure?
While we wait for a probably better answer, here's my tentative.

You state that you understand the concept of constant mass flow. Let's for a moment write the mass flow properly:

$$\dot{m} = \rho A v$$

on the left we have the mass flow $\dot{m}$, on the right we have the density $\rho$, the area $A$, and the velocity $v$.

If we want $\dot{m}$ to be constant while changing $A$, we need to change $\rho$ and $v$ accordingly. In these scenarios $\rho$ is taken as roughly constant, leaving only the velocity as free variable. While this might be more true for liquids, it is not too far from the reality also when air is involved (although you might observe minor variations in density).

Where do the forces come from? The walls of the duct and the fluid downstream (when decelerating, the fluid that is already at a slower speed will effectively work as a "wall" for the incoming fluid) or the fluid upstream (when accelerating the incoming fluid will push the rest of the fluid like an extruding piston).

In other terms the required energy comes from the pressure differential (the faster fluid has lower pressure).