Newly created primitive resources weren't being marked as updated in
real runs, because exists? was being run on an old object. Furthermore,
the tests didn't catch this because #exists? on any instance of
Pacemaker::Resource::Primitive was being mocked to return true. The fix
requires re-invoking Pacemaker::CIBObject.from_name after attempting to
create the new primitive, so that cib_object.exists? accurately reflects
whether the creation succeeded. However, testing this required mocking
Mixlib::Shellout#stdout to first return "" and then secondly a
definition string for the created resource, and unfortunately this
exposed a nasty bug in rspec-mocks:
https://github.com/rspec/rspec-mocks/issues/559
So we revamp the mocking of Mixlib::Shellout#stdout to use doubles
instead of #expect_any_instance_of.