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>