Behave exits more informatively / JunitReporter fix

When running Behave inside some other environment (for instance, from Jenkins via a shell script, as we are), it is useful for the exit value of the process to be something more than just 0 for success or 1 for failure. This tiny patch causes "behave" to exit with the sum of failed steps + undefined steps, which is (for us) the most useful measure of whether or not the tests are "green".

If all tests pass, then the return value is still 0. And failure is non-zero. I guess the only change for some people would be that undefined tests will cause a non-zero return value.

Maybe it would be worth making this more configurable (let the user decide which statuses of which types of items are included in the exit value), but this is a start, and it would be good to know if you feel this makes sense and is worth pursuing.

I also found a bug with the JUnitReporter, in which sometimes (for some reason) a scenario may not have a stdout or stderr attribute at all. Behave would then die silently (since this particular exception was not caught). So I added a check to see whether these attributes are present.