Make ResInsight build and run on Mac OS X

Patchset that enables ResInsight to be built using Apple Xcode 6.1.1 and run on Mac OS X 10.10.1 Yosemite. Some of these changes may be beneficial for building with Clang on Linux as well.

Note that most of the changes are in conditional defines for OS X so there should be no side-effects for users of other platforms. Those that are not fixes code which is really not valid C++ and rely on GNU extensions.

Without these changes, the development branch currently doesn't compile on OS X, and if the (trivial) compilation errors are fixed, it then crashes when updating the display for instance by selecting File | Testing | Mock Model from the menu.