atl: Improved AtlInternalQueryInterface implementation.