add a test suite
replace Regexp::Common with core Scalar::Util
clean up Perl style a bit

- Remove some superfluous parenthesis clutter
- Shorten a lot of single-line conditionals using postfix constructions
- Merge variable declarations
- Use $class/$self instead of $pkg/$obj as is customary
- Remove quotes around literal hash keys
refactor common query-response code
add listval_filter method and corresponding tests

Rationale:
A frequent use case for LISTVAL is to retrieve a list of resources for a certain
host or host group that is not known in advance, such as when the hosts have
different disks installed. Using the existing listval() method,
Collectd::Unixsock retrieves the entire list, parses each entry into a hash and
returns the list, only to have the caller throw away the vast majority of
entries immediately. listval_filter() allows the caller to pass any attribute
that can be passed to getval() and filters the list of resources retrieved from
the socket before parsing it, resulting in a large speedup.
The current implemntation has some code duplication, although listval() could be
implemented as a small wrapper around listval_filter() with just a few percent
speed penalty due to the extra dynamically built regexp.
add support for custom commands in redis plugin

Now that the redis plugin has moved to hiredis, it could
be worthwhile to add support for custom commands.

This diff implements a mechanism for executing commands which
allows for setting the type and type-instance. It doesn not
support hash or array returns, but if this is deemed necessary
could be added later on.

The canonical use case for this is for people using redis
has a queue (for instance, using solutions such as rq,
sidekiq and similar solutions) who want a simple way to
ensure the work queue size is not growing. To address this
you would use:

```
<Plugin redis>
  <Node local>
    <Command "queue_length">
      Exec "LLEN myqueue"
      Instance "myqueue"
    </Command>
  </Node>
</Plugin>
```

This would then produce a redis-local/queue_length-myqueue value.

If the idea has traction I'll add the doc bits.
rename command to query
use consistent naming for arguments
Provide sensible default for configuration values

This reorders arguments a bit:

- The query is expected to be the block argument
- The type instance is inferred from the query if unsupplied
- The type will default to gauge if not supplied
Add documentation bits.
Merge pull request #728 from mbethke/test-and-clean

Test and clean
Merge pull request #816 from collectd/feature/redis-llen

add support for custom commands in redis plugin