Add linear_combination_of_weights()

It is a safer alternative to reduce(lambda x, y: x + y[0] * y[1] / total, parts, 0.0) expression
which was requiring a separated calculation of total, prone to errors.
Fix release similarity calculation

Total didn't include all weights (ie. weights["format"] wasn't added), leading
to incorrect result, eventually > 1.0

The fix consists mostly to get rid of separated calculation of the total, using
previously introduced linear_combination_of_weights().

- partly rewrite compare_to_track() and compare_to_release()
- move parts building to new compare_to_release_parts() and drop return_parts parameter
- drop calculation of totals since this is handled in linear_combination_of_weights()
Add tests for util.linear_combination_of_weights
Merge pull request #307 from zas/fix_probability

Fix probability calculation, release similarities