show stdout/err from failed command execution

When executing a command the mysql service status command it is useful
to see the actual output of the failing command in debug mode, not just
the exit status.

Add a log_output_on_error parameter to execute_with_timeout() so this
can be reused.

Change-Id: Iff931d0489754303e099e8567bca3237fd476f8f
Closes-Bug: #1340124
Merge "show stdout/err from failed command execution"