Add validation methods, fix bug in dfs

DFS had a bug where an incorrect list of candidates would be propagated through
if they were all singletons.  As a result, it is necessary to validate every
grid that may be completed for such errors before returning it (easier than
validating after every propagation). Methods were added to validate a completed
grid.  Light refactoring.