Implemented constrained decoding (closes #173)

This is implemented as a filter against EdgeGenerator::addCandidate(). There is also some renaming of functions in this commit, as well as a test case.