D3D: Filter redundant API calls by caching state in StateManager

All D3D resources are now set through StateManager, which allows to avoid most of redundant API calls.
@kayru I've found the bug, if we call this function to set the shader to `nullptr` we pass the check. But if we don't apply that state and immediately call this function with the old shader we fail this test. Thus when we apply that state the geometry shader will be unintentionally be set to `nullptr` even though we intended to keep the geometry shader set to `m_current.geometryShader`.