UFactory::SortFactoriesByPriority

Helper function to sort an array of factories by their import priority - use as a predicate for Sort