Add a queue sorting method.

It doesn't modify the actual queue, only simulates it for testing
purposes.
Reset `tieOrder` each turn
Add some comments
Remove `runSwitch` action.

It did nothing but resort the queue unnecessarily. Also fix some debug
messages.
Fix crashes and errors in `sortQueue()`

It would not place elements at the beginning and would crash if
non-pokemon related decisions tied.
Use `sortQueue()` to sort actions, remove debugs
Use `sortQueue()` instead of `addQueue(null)`

Also remove some irrelevant comments