VI-OOD: A Unified Representation Learning Framework for Textual Out-of-distribution Detection