Add ability to have multiple compound modes for interinter

This is currently just a refactor and creates no change in performance.
It allows new compound types to be added easily in the future to
facilitate experiments with segmentation masks.

Change-Id: If48fed216d482454fabb45a304b4220ada0dbdee
10 files changed