Added cancellation methods

Methods to implement thread cancellation were added to the Thread class.
Completed code documentation