fix insecure tempfiles

- modernizes all the tempfile code as well
Use Tempfile.open to take a block

- Tempfile.new should either take a block or raise if it gets one,
  silently ignoring the block is poor form.
add editing specs for knife/core/ui
clean up some constants
add semi-functional tests

- don't mock Tempfile, and check its file mode
hardcore mocking of Tempfile

- rejects any message sent to Tempfile
port node_editor to use ui.edit_data()

- easier to change the code and reduce the code dupliation than to
  write the specs for this object.
Merge pull request #1083 from opscode/lcg/CHEF-4662-11-stable

CHEF-4662: fix insecure knife tempfiles