Implemented changes to wb.h and CMakeLists.txt to address compile and runtime errors on Windows and OS X

Hey Ashwin,

Please find attached a number of commits to ```wb.h```. The most notable are:

* Inserted checks for ```malloc()``` returning ```NULL``` in ```wbImport()```
* Protected ```wbImport()``` from writing past the bounds of arrays
* Implemented a check for ```wbTime_start()``` / ```wbTime_stop()``` timer pairing
* Corrected a compiling error on Visual Studio 2010
* Wrapped all remaining 'internal' functions and structures in a namespace ```wbInternal```

and

* Updated CMakeLists.txt to correct for the changes introduced in CMake 2.8.10 [this should address Issue #30]