Made the mutexes in the model classes "mutable" rather than "static".
Fixed the EncodeThread class to work with the recent model changes.