Added thread type attribute.

This PR is needed by the following [PR 5308] (https://github.com/edx/edx-platform/pull/5308) in order to function correctly.

@jimabramson @gwprice Please review.
Apparently the `set` method skips callbacks, which I think is desirable here. Be sure to include a comment about why we are using set instead of update_attributes.