api/v2: Pass in empty query for facts/resources.

When facts() or resources() is called without passing in name/value or
type/title and without passing in a query the intention is to query for
all facts or resources. However, for PuppetDB 1.3 we need to pass in an
empty query, PuppetDB 1.4 makes the query optional.

This also fixes the current beahivour for PuppetDB 1.3 as not passing in
a query right now causes an HTTP 400 to be returned.