rename #expect_definitions to #stub_shellout and document

This method was previously misnamed - we are not setting any
expectations, but instead stubbing Mixlib::ShellOut so that
its #stdout command returns given values which can then be
tested against.

Also rename the parameters for clarity, and add some explanatory
comments.
add support for testing scenarios where commands fail
handle creation errors more robustly

We have seen strange cases where creation of a new CIB object apparently
failed:

  http://pastebin.suse.de/9346

Even though this is strange, we should certainly expect
Pacemaker::CIBObject.from_name to return nil in a few cases, so we need
to handle that properly.