d3d10: Properly cleanup shader variables.