Disable large pages only if class data sharing is possible (i.e., serial gc is in use).
- Move the code that determines whether sharing should be enabled to a new method, set_shared_space_flags().
- Combine the compressed oops checks from check_compressed_oops_compat() into set_shared_space_flags().
* This is a behavior change: prior to this fix, the vm would exit with an error message if UseCompressedOops and either -Xshare:on or -Xshare:dump was specified on the command line. Now the vm prints a warning and disables UseCompressedOops, which is how other options that conflict with class data sharing are handled (UseParallelGC, UseG1GC, UseLargePages, etc.). The old behavior was also inconsistent between client and server.
- Call set_shared_space_flags() after set_ergonomics_flags() has selected a garbage collector.
- Obsolete the unused var ForceSharedSpaces.