cluster/dht: Modified the calculation of brick_count

Whenever new_layout is calculated for a directory,
we calculate the number of childs of dht, who will get
the actual(Non-zero) layout-range, and assign range
to only those subvolume and other will get 0 as
their layout->start and layout->stop value.

This calculation is based on either
a) weight_by_size or
b) number of brick who will be assigned the non-zero range

So if in case we are not assigning the layout based
on weight_by_size, we should choose the "bricks_to_use"
instead of "bricks_used".

In regression test,
we found that priv->du_stat[0].chunks was zero. In this
case "bricks_used" variable will be zero, which will cause
crash for

chunk = ((unsigned long) 0xffffffff) / bricks__used;
calculation.

Change-Id: I6f1b21eff972a80d9eb22771087c1e2f53e7e724
BUG: 1143835
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/8792
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>