MB-11746 Fix race condition in ddoc updation

When ddoc_update happens, we restart the group process. ns_server calls
define_group when ddoc is updated. Restart of group process and ns_server
call to define group are independent to each other. In define_group, we
first get the pid of the group process and then call the gen_server call
for define_view.If the group process exits in between getting the group
pid and calling the gen_server, when we call the gen_server, we get the
error.I have added a retry logic if exit reason is normal.

Change-Id: I7f3b23e43162e0d7eb93794c6ba3fa11bfbfce1c
Reviewed-on: http://review.couchbase.org/39663
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>