Add tests for CGemv.

They should detect the bug described in gh-1240
Try to detect and work around bug in MacOS parallel blas
Small pep8 changes
Remove unused code.
Add missing prototype, and debug print statements
Use same comparison in both snippets
Add declaration of cblas_sdot in actual header
Refactor code for trying to compile/run some code
Fix name error
Fixes after code review.
Add logging statements to help debug if needed
Merge pull request #1250 from lamblin/fix_blas_macos

Try to detect bug in Mac OS X parallel BLAS