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