Change deep_to_hash to not extend Chef::Node

It seems like under Chef 11, some of the object structure changed where extending `Chef::Node::Attribute` was not exposing the `deep_to_hash` method within the template.

This instead changes it to expose a module called `DeepToHash` which the template can call to without needing to monkey patch/extend `Chef::Node` itself.