Do not use TreeItems in PartWidgetFactory

The TreeItem class is an implementation detail of the ImapModel and should not
be used outside the ImapModel.