service.bat properly configures mem settings

service.bat converts X(m(s|x)|ss) to MB/KB and uses dedicated arguments to the underlying JVM DLL
empty/unset JAVA_OPTS no longer trips commons daemon
fixes #3785

(cherry picked from commit 971db7dd90262f1b3ce678be517fdabc933eb8bc)