Added a class to manage errors in threads

I need an error class to properly report errors from threads. The
ThreadError class is intended to this task but I do not know right now
what king of responsibilities has to own.

I have added the class without testing but I think I will have to add
some stuff...
Added a better error reporting to threads

I have added a better error reporting to the Thread class.
Added the exit method to the Thread class

I have added the exit method to the Thread class to remove the explicit
call to pthread_exit in the mock class SimpleThread.