Refactor selection functions in qtutils

Several of the functions for getting selected items from a QListWidget or QTreeWidgetItem were either redundant, unused, or could be more efficient.  Refactor accordingly.