* lib/razor/matcher.rb: factor the code for fact and metadata into common method

In the next commit, we will introduce yet another use of the same logic.
Add a 'state' function to the matcher language

This makes it possible to interrogate the 'installed' state of a node from
tag rules, i.e. a tag rule can now check whether the node has something
valuable on it or not.
Rename the 'unbind-node' command to 'reinstall-node'

This matches more closely now what the command actually does
API change: return objects instead of raw arrays

In the places where the API used to return raw arrays (e.g. all the
collections), now return an object where the actual array is in the 'items'
property. This allows us to annotate such collections with additional
properties in the future without breaking API backwards compatibility.

The corresponding change in razor-client is in commit 07ae04a6