[cs/java] add -D clean-out-dir to remove old source files from the output directory

Subj. This works by collecting `out_files` list and then traversing output directory and removing all files that are not in the list.