A Metropolitan Police inspector has been dismissed for being part of a chat with racist, sexist and inappropriate messages after a misconduct hearing.