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.