Add retry block util and retry cow update

We currently fail sometimes when updating cows, and the issue has always been
resolved by just trying the update again. This commit introduces a utility
method to retry a code block a number of times, which is more flexible than
loop_shell_command which expects a shell command only. The cow update is
wrapped in a block and executed 3 times, failing after the 3rd try without
success. This commit removes the old brittle loop_shell_command method and
replaces calls to it with retry_on_fail.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Redo block arg in retry_on_fail to be more specific

This is a bit more idiomatic, and also fails more helpfully if no block is
passed.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Use a symbol for respond_to? in retry_on_fail

This is more idiomatic than using a string.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #103 from MosesMendoza/retry_cow_updates

Add retry block util and retry cow update