MB-12112: Improve ERL_BUILD_OTP macro

Erlang apps that follow the OTP convention can easily be build with
more hard-coded paths, less flexibility is needed. With improvements
to the ERL_BUILD_OTP macro, less code within individual CMakeLists.txt
files of OTP apps is needed.

Change-Id: I9b03b82194dc787715730d3adb2bc599af162d0a
Reviewed-on: http://review.couchbase.org/41146
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>
Output geocouch into the common build directory

Change-Id: Ic1cc924386e4bf807dce8b83b33f9fb0ac7ae28b
Reviewed-on: http://review.couchbase.org/41774
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>