Replace MenuFactory SplPriorityQueue by an array.

This is causing in some way memory leaks.
Optimization after replacing SplPriorityQueue by an array
Merge pull request #111 from krymen/factory-queue_to_array

Replace MenuFactory SplPriorityQueue by an array (optimization)
Tweaked previous merge