DO NOT MERGE: ghastly algorithm for displaying allocations

Find all groups of criteria sharing the same allocations, and partition into Cartesian products for display.

TODO:
* add logged-in status and bucketing
* see if the algorithm can be made more readable
* finish intl
* date filter and history rebuild

Change-Id: Id10b191bd46ce8c6776506644e4e20d983a6380e