Add thread type feature

There are two thread types, discussion and question. Discussions have
the same behavior that current threads do. When a question is returned
from the API, it contains separate fields for its endorsed and non-
endorsed entries.