Improvements to ant build process

These patches carry a bunch of changes to build.xml made by @Master-Jim that allows `ant build` to work again. To facilitate that, some libraries that need to be available during the build process have been added.

Finally, .gitignore is updated to ignore autogenerated stuff.