Moved NodeQueue out to a generic PriorityQueue class.
Moved BORDER_REG to Region.cs, renamed it to BorderFlag, and "encapsulated" it with static helper methods.
Moved some methods from PathfinderCommon to MathHelper.
Optimized some helper methods by passing in structs by reference instead of by value.