[PATCH 6/6] d3d10/effect: Reduce duplication in state and shader object release helpers.