Fix DMD Issue 10425 - Link error with templates.

Merged dmdfe changes in typeinf.c
Update struct type info generation to reflect changes in dmd frontend
Remove redundant FuncDeclaration::nestedVars.

The change not only makes the code cleaner but also fixes compilation of multiple files at once.
Previously, fd->nestedVars may have been filled twice if fd was a template function instantiated in two modules simultaneously.
Implement cast to void
Implement ClassReferenceExp::toElem
Fix DMD Issue 10451 - Array of pointers to opaque struct gives forward reference errors.
 Fix DMD Issue 11238 - Codegen error when this is a ref parameter to the method
Exclude threadasm.S from build if CMake version is less than 2.8.5.

Assembler support was rewritten in CMake 2.8.5. The new functionality
is required to assemble the file, otherwise a bunch of error messages
is generated. The solution is to exclude the file from the build.
This is only a problem for non-x86 platforms (PPC, Mips).

General advise is to use at least CMake 2.8.5. This fixes #464.
Only define version Android if compiling for this environment.

Android is a variant of Linux. In order to simplify the version coding,
only version Android is defined (version linux and version Posix are not).
Check if basic types are read from object.di before usage.

If object.di was not read or is incomplete then basic types may be missing.
This results in a crash if they are used during runtime initialization.
This fixes #551.
Fix DMD Issue 8360 - Destruction of uninitialized temporary struct with assert
Fix a clang warning
Merge remote-tracking branch 'origin/master' into merge-2.064

Conflicts:
	gen/runtime.cpp
	runtime/CMakeLists.txt
Merge branch 'merge-2.064' into merge-2.065