MB-12112: Streamline CMake files

With an improved ERL_BUILD_OTP macro less code is needed within
the individual CMakeLists.txt files.

Change-Id: I9b03b82194dc787715730d3adb2bc599af162d0a
Reviewed-on: http://review.couchbase.org/41147
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>