Strange performance bottleneck is discovered.

A bash script provided for performance testing.
The issue is in fault_tree_analysis.cc AssignIndices() function.
The containers for primary and intermediate events seem to have big
influence how the code gets compiled and run.
Many minor fixes after Coverity check.
Merge branch 'develop' into coverity-scan