d3d: Enable state caching, fix another color issue, fix scale

The biggest thing is state caching here.  The performance improvement is small (3%), but I think it's better to have it from as early as possible if we ever want it.

-[Unknown]