[CHEF-4110] Add a "whyrun_safe" attribute to ruby_block

10-stable edition
Add test for whyrun-safe in ruby blocks

Also refactor the code to be slightly cleaner and fix 'updated' bug.
Revert Chef::Config[:why_run] after test

Also, don't claim to be a state_attr.
Move to making a seprate resource/provider