Add a build mode for "release optimizations with leaks checks", handle a jar in CI