Refactor functions that handle 'packages' in consensus/votes
This is a side issue of legacy/trac#18840 (moved).
The code managing packages for consensuses and votes seems to be of particularly low quality.
See compute_consensus_package_lines() doing ad-hoc parsing. And see validate_recommended_package_line() doing more ad-hoc parsing and having wrong return value patterns. Fortunately, both of them are weakly tested in the unittests.
Maybe we should refactor and add more testing for these funcs?