Finished A*, line rendering.

Various refactorings, changed heap operator order.
Fixed mutex around spriteload, fixed scale & 0-1 hotspots.