Change hostvars to a mutable mapping to more closely resemble a dict

Fixes #4030