Exit on check-examples failure

Should avoid Travis to pass even though there are errors.

Waiting for the check-examples to finish to get all the errors.
It may also be necessary in order to free system resources like file
descriptors.
Merge pull request #2816 from gberaudo/exit_on_check_examples_failure

Exit on check-examples failure