There's nothing fancy going on here. Taking the differential of an expression is "physics code" for computing a first order Taylor expansion of the expression around its initial value. In other words, say that you have some physical quantity $Y$ which is a function of a variable $X$. Let $X_0$ represent the initial value of $X$. Then if $X$ changes to $X_0 + \delta X$, the value of $Y$ becomes
$$Y(X_0 + \delta X) \approx Y(X_0) + (\delta X) Y'(X_0)$$
and the change in $Y$ is
$$\delta Y = Y(X_0 + \delta X) - Y(X_0) \approx (\delta X)Y'(X_0)$$
The expression on the right is the differential of $Y$. This is really just a simple way of expressing how much $Y$ changes when you change $X$ by a certain (small) amount.
In your example, you can identify $\theta$ as $Y$ and $\lambda$ as $X$ (simply because we think of wavelength as the independent variable, and the angle of a diffraction fringe as a dependent variable). So the equation
$$d_s\cos\theta\;\mathrm{d}\theta = m\;\mathrm{d}\lambda$$
tells you how much you expect the angular position of the fringe to change if you adjust the wavelength by a small amount, or how much angular separation you would get between two nearby wavelengths (for resolving closely spaced spectral lines), etc. Using this equation to calculate, say, "these fringes are .04 radians apart" is a lot more convenient than calculating the absolute position of one fringe using the original equation $d_s\sin\theta = m\lambda$, calculating the absolute position of the other one using the other wavelength, and subtracting to see what the difference is.
Why will a blue ray bend lesser than a red ray through a slit of the size a little bigger than the wavelength of the blue ray?
Don't think of bending. Think of diffraction like this: if you have a plane wave incident on a slit, then you can think about the space in the slit as being a line of infinitely many point sources that radiate in phase.
If you are looking straight down the slit, then all those point sources are in phase. There's not much unusual going on here.
However, if you move a bit to the side, then all those point sources aren't in phase. They are, really, but since they are not at equal distances to you, the radiation from each is delayed by a different amount. Depending on your position, the point sources interfere constructively or destructively, and this is what yields the diffraction pattern.
If you look closely at this image, it appears it was generated by an approximation of four point sources in the slit.
Now, the number of these point sources there are, and the maximum difference in phase between them, is a function of the size of the slit, obviously. If the slit is wider, then when viewed from some direction slightly off center, the phase difference from the left-most source and the right-most source will be greater, because the difference in distance between them is greater.
Compare a small slit:
To a bigger slit:
The significance of the size of the slit is apparent, right?
Well, changing the wavelength is equivalent to changing the size of the slit. If we make the slit bigger, and make the wavelength bigger by the same amount, then the difference in distance between the sources is greater, but the rate of change in the wave function is slower, so the phase difference between the two extremes of the slit is the same.
But, if we just make the wavelength smaller, and leave the slit the same, the rate of change in the wave function is faster, which is equivalent to making the slit bigger without changing the wavelength.
Images from Wikipedia
Best Answer
Deflection angle due to a diffraction grating depends on the spacing between the grating lines, and not on the index of the grating (assuming air-grating-air). Longer wavelengths are deflected through larger angles by a diffraction grating.
On the other hand, when light is refracted by a prism, the deflection angle depends on the refractive index of the medium, and refractive index for each wavelength depends on the electronic and quantum properties of the medium. In most glasses the index decreases as wavelength increases in the visible ranges, so the deflection angle (assuming air-prism-air) decreases with increasing wavelength. But there are exceptions. See for example Anomalous Dispersion. In the narrow portions of the spectrum where the index increases with increasing wavelength, the deflection angle from a prism will increase with increasing wavelength. So, though it's usually true in refraction that "shorter wavelengths bend more", it's not always true.