NExT-Chat: An LMM for Chat, Detection and Segmentation