Refactor code

The code in question figures out whether there is already a memory
setting in the Java option. We want to find out about additional
settings, so let's make the code reusable.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Do not override -Dplugins.dir=... from ImageJ.cfg

Jerome Mutterer pointed out that -Dplugins.dir=... settings in
ImageJ.cfg are always overridden by the ImageJ launcher.

Fix that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>