Redmine#1735: classesmatching() function

This adds a `classesmatching` function, e.g.:

```
body common control
{
      bundlesequence => { run };
}

bundle agent run
{
  vars:
      "c" slist => classesmatching(".*");
  reports:
    cfengine::
      "Classes matching = $(c)";
}
```

produces all the defined classes:

```
...
R: Classes matching = cfengine_3_5
R: Classes matching = net_iface_eth0
...
```

Please review the code and once it's considered OK, I will add an acceptance test.