Refactor fault tree validation function.
Tests for out-of-order gate additions in a fault tree.
Merge branch 'develop' into coverity-scan

Conflicts:
	doc/todo.rst
Remove NDEBUG preprocessor directive.
Initialize num_prob_mcs_.