Handle case in addThread when both arguments are the same

attachThread calls addThread with the same arguments, but the current assert and expect checks expect mutually exclusive states for the two arguments. This pull request adds Thread::NoState to the allowable states for the t argument to match what we require from p's state.