Correct error msg when resource or output are empty

When resource or output body is empty, we get traceback
instead of error message. This is wrong, so this patch
handle such situation by raising StackValidationFailed
exception. Furthermore, if output body is not a mapping,
we got traceback too.

Change-Id: I27f3a732480a851fd2eceb83e5fcc850ee59bb73
Closes-bug: #1386242
Merge "Correct error msg when resource or output are empty"