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.
I think this would be better done with an after_update callback in the model. Let me know if you need guidance on how to implement that.