Potential matching speed fix (issue 2869)

https://code.google.com/p/otwarchive/issues/detail?id=2869

Please see the gcode issue for detailed info! The short version is that this drastically speeds up the generation of potential matches (3 days for a big challenge ---> 14 hours) and allows for regenerating potential matches for individual signups (so all potential matches don't have to be regenerated just because one person didn't have any potential matches and their signup had to be tweaked).

I've also done a bunch of cleanup and refactoring on the potential matching page.