download EDG tarball when needed

(cherry picked from commit (EDG3) b924662f0040474423977a3ef9d24eae8f5cd44c)
(ROSE CMAKE) Compile with more languages enabled

Changes related to compilation errors:
* setup #defines for EDG_*_VERSION_NUMBER
* define ROSE_SHLIBPATH_VAR.  Currently, this is set to LD_LIBRARY_PATH.
* quote JAVA_JVM_PATH within rose_config.h.in.cmake
* within this same file, Update ROSE_OFP_PATCH_VERSION_NUMBER to 3
  (was previously 2).  This allows us to compile
  libfortran_ofp_parser_c_jni_FortranParserActionJNI
* Add JAVA_AWT_INCLUDE_PATH to list of include directories for
  ECJ_ROSE_Connection.

Improvements:
* new CMake config options to mirror the various --enable-<language>
  flags of the autoconf buildsystem.
* new warning that the EDG binary tarball is only available for GCC.
* better platform & compiler detection prior to downloading the EDG
  binary tarball.
* extract needed source files from OpenFortranParser-20111001.jar
* ROSE_DLL now links against roseFortran & roseJava when these languages
  are enabled.

Running Flex from CMake:
In order to build libroseFortran, we need to first run flex on
preproc-fortran.ll and preproc-fortran-fixed.ll.  I changed ROSE's
toplevel CMakeLists.txt to use CMake's built-in copy of FindFlex.cmake
instead of the older version found in ROSE's source repository.
This allows us to use the FLEX_TARGET macro to process Flex parser
files.  I also removed the "outfile" option from these two .ll files.
This allows us to output these files to some filename other than
lex.yy.c by passing the -o<file name> argument to flex.

(cherry picked from commit (EDG3) cbc476b386eaa156ffdb2a4d0ecc8f80d953ed4a)
(CMAKE ROSE) libroseJava depends on ROSETTA

Use add_dependencies() to ensure that that ROSETTA's generated
source files exist before we attempt to compile them for
libroseJava and libJavaTraversal

(cherry picked from commit (EDG3) acc301f90c9b9614bebbc17195c7c08ec34af57d)
(ROSE CMAKE) libroseFortran depends on ROSETTA

Similar to the previous commit, make sure that ROSETTA's generated
source files exist before we attempt to compile the libraries within
OpenFortranParser_SAGE_Connection.

(cherry picked from commit (EDG3) fe16985eebea85286b3e4cef47a25c091e08b5a8)
(CMake ROSE) make install on Linux

* We can now run "make install" from our Linux binary directory and have
  it complete successfully (without error).  This does not mean that
  we're installing everything we need for a meaningful distribution of
  ROSE.  It just means that "make install" no longer results in an error.

* Installed header files now honor CMAKE_INSTALL_PREFIX.  Previously they
  were hardcoded to be installed in /usr/include .

(cherry picked from commit (EDG3) da06a2abd7b136e965dbbe6c71b2163bc2827726)
(ROSE CMAKE) cross-platform gettimeofday()

This commit introduces a cross-platform implementation of
the POSIX function gettimeofday().  This allows timer.cpp
to be compiled on Windows using Visual Studio.

(cherry picked from commit (EDG3) 70f35b0d83bdbdef6c7b83120a076cbdd86a6b81)
intermediate changes commited so that I can revert to older version and see if I see AST consistency failures
Made changes to sage builder and ROSETTA expression to correctly support Typeid
(CMAKE ROSE) resolve C2561 errors

Add return statements after calls to abort() in functions that return
non-void.  This eliminates C2561 errors on Visual Studio.

Also, define strncasecmp as _strnicmp for Visual Studio.
(cherry picked from commit 70b521ea2e1fde6925b0ee80ab46d6adfa40cd54)

Conflicts:

	src/ROSETTA/Grammar/BinaryInstruction.code
	src/backend/unparser/languageIndependenceSupport/modified_sage.C
	src/frontend/Disassemblers/Expressions.C
(CMAKE ROSE) define NAN for Visual Studio

This commit also contains some other math-related compilation error
fixes for PStatistics.C

(cherry picked from commit (EDG3) f12fc209dabf09ac5be8b28735ad7fdc32cb4bfa)
(CMAKE ROSE) compile __attribute on Visual Studio

The __attribute mechanism is only supported by GNU compilers.
This commit adds #define directives so that code containing
__attribute can be compiled by Visual Studio.

(cherry picked from commit (EDG3) 88a061f98ac035f5d193b839d962c5814adb7966)
(CMAKE ROSE) define strtoull for Visual Studio

Microsoft decided to call this method _strtoui64 instead for some reason.

(cherry picked from commit (EDG3) 87811c91907df285e198755994958e414528219a)
(CMAKE ROSE) don't name variables "interface"

On Visual Studio, interface is a reserved keyword.  This commit renames
"interface" variables to iface instead.
(cherry picked from commit 21d9481e017449a2f3954d2f9c6f560c4b950016)

Conflicts:

	src/backend/unparser/JavaCodeGeneration/unparseJava_statements.C
(CMAKE ROSE) replicate mkstemp() on Windows

Visual Studio does not have a mkstemp() function.  This commit
introduces new platform-specific code to replicate the behavior
of mkstemp() on Windows.

(cherry picked from commit (EDG3) 8933d473dd9d46502e71c97df2725676ae05e074)
(CMAKE ROSE) unambiguosly define State type

This commit resolves C2244.  The fix was to be more explicit about
which State type we are referring to.  This problem arose because
Windows defines its own State type.

(cherry picked from commit (EDG3) 65fd1a1450656c0159b4dd3551e6b8c4da435e44)
(ROSE CMAKE) Rename SelectObject

* Windows defines a function called SelectObject within Wingdi.h .
  This was clashing with ROSE's class of the same name.  This commit
  renames the class to RoseSelectObject.

* PtrSet.h also failed to compile on Visual Studio 2008.  The problem
  was that Visual Studio is apparently more strict about the difference
  between const iterator and const_iterator than other compilers.
  Thus, this commit also contains new code to convert between these two
  types.

(cherry picked from commit (EDG3) d6551ba8aa6eb3255c26ee399f670676b89ce16a)
(CMAKE ROSE) don't include err.h on Visual Studio

This is a GNU header file.

(cherry picked from commit (EDG3) c1a67fa3ea25f592f72ae59be17bdf3b6e140cc0)
(CMAKE ROSE) replace __null with NULL

__null is not defined on Visual Studio
(cherry picked from commit 192e6fa317efbcdf9141b8e88370ccc273746f6c)

Conflicts:

	src/frontend/SageIII/sageInterface/sageBuilder.C
(CMAKE ROSE) replace __out with __outstream

__out is not defined on Visual Studio

(cherry picked from commit (EDG3) 0ed1af3613399e95d3b3d2ac269b5e0789367fcc)
(CMAKE ROSE) don't name variables OUT

This clashes with Windows code.  Renamed to OUTPUT instead.

(cherry picked from commit (EDG3) 939c5ca42836c25cd85f35683441f9745e5e2d7f)