MB-11371 Fix corruption in partition versions list

During view engine operations with replicas enabled, it
has been observed that parititon version data structure ends
up with duplicate entries for some partitions.

get_more_passive_partitions() helper function grabs all the
passive_partitions messages from its mailbox and merge into a
partitions list. The resulting partitions list may not be sorted
if multiple passive_partitions are processed. This partitions
list is used to construct partitions versions list and results
in unsorted partitions version list. Unsorted partition versions
list causes corruption in building another partition versions list
by merging the existing list. The partition version list
always needs to be sorted. Fixed get_more_passive_partitions()
method to return sorted partitions list.

Change-Id: I4d3794f3857cbded3017c5b842ed63361073eadb
Reviewed-on: http://review.couchbase.org/38139
Reviewed-by: Nimish Gupta <nimish@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Sarath Lakshman <sarath@couchbase.com>