trying to do things the 'lua' way.  metatables and shit.
moved the queue out of dstarlite because other things might want to use it.
major bug in pq.  didn't know lua needed local keyword on closures.  Otherwise its some sort of weird global closure.  This bug is in other places
just saving some work.  I've mashed too many things in here to list them.  Mostly a new algorithm for doing a tree farm.