Refactor source layout for CMake

Change-Id: I96390ac30de203f1ea36fadfc57818d89db7ee4c
Reviewed-on: http://review.couchbase.org/35193
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>