Fix memory aligned allocation

The _mm_malloc function is defined by GCC only for
x86 and amd64 architectures.  See build failures on
 https://buildd.debian.org/status/package.php?p=oce&suite=experimental&ver=0.11-1

Call _mm_malloc if mm_malloc.h header is found, otherwise call
posix_memalign if this function was found, otherwise call malloc.
Added headers needed for template instantiation
Missing stdio header
Added io.h header for dup declaration
Reflect type changes in wok build system
Missing headers and minor preprocessor fixes

Added stdint.h header for intptr_t declarations and fixed minor
preprocessor issue (wnt case under unix block & borland case).
Merge pull request #327 from tpaviot/review/bcc-fixes

Added stdint.h header for intptr_t declarations and fixed minor
preprocessor issue (wnt case under unix block & borland case).

Reflect type changes in wok build system.

Added io.h header for dup declaration
Merge pull request #331 from tpaviot/review/port-memalign

Fix memory aligned allocation
0023436: BRepOffsetAPI_ThruSections crashes when lofting through identical profiles
0023603: Boolean operation between two edges fails
Upstream fix