IntenDD: A Unified Contrastive Learning Approach for Intent Detection and Discovery