Store weighted all_near_match with freqs

We need the freqs to calculate weight properly.

Some comments too.

Change-Id: Ifa142233134c77d077920fb29f3df7f54540cf8e
Merge "Store weighted all_near_match with freqs"