Improved thesaurus class

Optional immutability and faster __len__