For ENG-5865, use conditional compilation for Java native memory management checks

For ENG-5865, add flag file to git ignore