Javascript AI

Provides the capability to have a Javascript-based AI, and then implements a priority-based AI library. All major AIs have been moved over to the priority AI system. Several more JS methods and properties added, mainly for Ship.

Obviously needs thoroughly testing. There's some shipdata changes, so you'll probably need to remove shipset OXPs to test properly, since not every ship with a JS AI is in the autoAIMap

Draft documentation at http://wiki.alioth.net/index.php/User:Cim/JSAI

Closes #39, Closes #40, Closes #35, Closes #15. Also fixes a couple of other bugs especially with commits 73db0d2, 51651f2 and 9f06814 .