Add a ComRef type for holding references returned by DirectX factory methods to perform automatic management of resource lifetime.