mon_network.c: only free vbuff after we're done using it

These two 'for' loops are still using 'vbuff' after it was free()d.
Merge pull request #1314 from tzz/test/redmine3315-findfiles-inputs

Redmine#3315: staged acceptance test for findfiles() in inputs
Merge branch 'fix-monitord' of git://github.com/xrg/cfengine-core
Fix memory leak in cf-monitord.
datastate() function to provide the container used by default templates