improved queuing

added the queuing changes from my Elanoron branch, but made sure the
queue list from the master matched the new queuing scheme as close as
possible. Also moved some of the more important afflictions up in the
priority queue.