Arrange flows in descending order by flow priority.

Signed-off-by: Min Chen <minchnew@gmail.com>
Fix a bug where invalid flows will result in empty flow tables.

Signed-off-by: Min Chen <minchnew@gmail.com>