Fix backend weighting selection algorithm
Fix backend weighting selection algorithm

Indexes in the weights array need to match position-for-position those
in the c->backends array.  Therefore we artificially set weights for
non-viable backends to 0, causing the cumulative to stay at that of the
previous (viable) backend.

jhunt/pgrouter,jhunt/pgrouter,jhunt/pgrouter