[COOK-3470] Improvements in /etc/mavenrc template

- Remove JAVA_HOME environment variable
- Use a flexible attribute for MAVEN_OPTS environment variable