(#12412) Refactor puppet_resource('host')
Previously, the host tests were creating files in '/tmp' and failing
on Windows.
This commit changes them to use agent.tmpfile instead. Most of the
changes are a result of not being able to call TestCase#on with an
array of agents, and instead iterating over each one in an outer loop
(so that context-dependent tmpfiles can be created).