Added AVX2 detection to cmake and created CPU acceleration macro
The main CMakeLists.txt has been cleaned up by moving
the CPU SIMD acceleration tests to a separate module,
which now also supports AVX2 detection. Acceleration
detection has been improved by actually testing SSE/AVX/AVX2
codes with the flags, rather than first testing flags and
then code (since some compilers silently accept illegal flags).
Cmake now also now detects options to use the clang built-in
assembler on OS X together with the gcc compiler when AVX
acceleration is selected, which makes it possible to use
AVX/AVX2 in combination with OpenMP support on OS X using
free compilers.
Change-Id: I6f9de80a87283cec4cf4211c4d0068d32315ba90