match_to_list: preserve order

This allows us to properly test behavior of best_match_to_list with
different permutations of the input.
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index 8c65d66..154b8a2 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -1776,7 +1776,14 @@
 	@rtype: List
 	@return: A unique list of package atoms that match the given package atom
 	"""
-	return [ x for x in set(mylist) if match_from_list(x, [mypkg]) ]
+	matches = set()
+	result = []
+	pkgs = [mypkg]
+	for x in mylist:
+		if x not in matches and match_from_list(x, pkgs):
+			matches.add(x)
+			result.append(x)
+	return result
 
 def best_match_to_list(mypkg, mylist):
 	"""