Fix: libpacemaker: Improve error codes in pcmk__simulate.
There's a lot of places errors can occur in this function, which makes
it a little difficult to tell what went wrong. A lot of these are
handled by just calling pcmk_legacy2rc or otherwise grabbing errno or
the return value of a called function.
This patch deals with some others:
- If pcmk__new_logger fails, return pcmk_rc_error. There's lots of reasons why this function could fail, most of which are because of programming errors or being out of memory. We can't know the underlying cause so return the generic message.
- Add and return new error codes for writing the dot and graph files. These can fail for lots of I/O reasons. We don't have any way of returning the exact error (or for differentiating between which one failed), so return a single error for each and hope the user can figure it out from other logs.
- Return the actual graph_rc status from run_simulation and compare it to transition_complete. Previously, the caller was just relying on the fact that it returned 0 which is the same as pcmk_rc_ok. And then that can be turned into a new pcmk_rc_invalid_transition return code for passing back up the call stack.