add thread and note api (bug 879545)

Yet to write thread/note creation tests. Pushing out before it becomes too big.