Allow the project to be built standalone

* Define all CMake macros used
* Add headerfiles to targets to make the visual
  studio projects easier to navigate in

This information is used by the project settings

Change-Id: I0610ba57388c1f32141401486e1c26cb2e8ff034
Reviewed-on: http://review.couchbase.org/33929
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>