Move PartWidgetFactory to UiUtils and make it not QWidget specific

REVIEW: 119818