More changes and improvements to the threads.

- Changed the position of the sleep so that if an exception occurs, the
thread still sleeps.
- Moved some of the variables out of the threads and into the
TRConfigCache to make reloading easier.
- Made sure threads get stopped when the plugin is disabled.
- Commented some unused code.
- The log class now handles the stack trace elements logging.
- Added javadoc information to some methods.

- Changed the hasbypass function in Util so that if the sub is null it
will not add the dot on the end.