Changed interface to the pairwise matchers to accept a vector of pointers. This should be much more memory-friendly with very large problems

Change-Id: Ib02fbcbe864f8743df9d15f5be1dcc485e05e797