Morse-Smale index theorems for elliptic boundary deformation problems