Try to define groups in capi_set_view_manager:apply_current_map.
Try to define groups in capi_set_view_manager:apply_current_map.

This change unbreaks flush_all. Also it helps to avoid following
race. If some design doc is created right before server is shut down
(and thus notification from master db watcher is not processed well)
then the view group for such a document would not be created at next
start.

Change-Id: I03f0124503dada2683cfb21b6b39364b6b5b3d56
Reviewed-on: http://review.couchbase.org/11717
Reviewed-by: Aliaksey Kandratsenka <340b8e09ca65cd3fc686427fcfed17e87eaf61e2@gmail.com>
Tested-by: Aliaksey Kandratsenka <340b8e09ca65cd3fc686427fcfed17e87eaf61e2@gmail.com>

mschoch/ns_server,ceejatec/ns_server,nimishzynga/ns_server,nimishzynga/ns_server,vzasade/ns_server,t3rm1n4l/ns_server,membase/ns_server,mschoch/ns_server,membase/ns_server,daverigby/ns_server,mschoch/ns_server,ceejatec/ns_server,pavel-blagodov/ns_server,nimishzynga/ns_server,t3rm1n4l/ns_server,vzasade/ns_server,membase/ns_server,t3rm1n4l/ns_server,ceejatec/ns_server,ceejatec/ns_server,nimishzynga/ns_server,nimishzynga/ns_server,daverigby/ns_server,membase/ns_server,pavel-blagodov/ns_server,nimishzynga/ns_server,mschoch/ns_server,daverigby/ns_server,ceejatec/ns_server,ceejatec/ns_server,mschoch/ns_server,pavel-blagodov/ns_server,daverigby/ns_server,pavel-blagodov/ns_server,mschoch/ns_server,daverigby/ns_server,vzasade/ns_server,membase/ns_server,vzasade/ns_server,t3rm1n4l/ns_server,membase/ns_server,t3rm1n4l/ns_server