Decrease maven & tests heap size.

I spent quite a bit of time trying to profile the tests in order to cut GC pauses & reduce the heap slightly.  It may or may not make the build succeed more.

It seems odd to set such a large heap for maven.  The total available memory is 3GB, so the heap + perm shouldn't exceed that limit.  I've set `Xmx` for maven to 1g, which (I hope) will stop the random OOMs.  This actually over-subscribes the memory somewhat (if you include the tests), but we should be able to get away with it.