Improve build.xml

'ant test' works now, and the dependencies are a bit better (for
example, 'test' doesn’t require 'compile').