Refactor and add tests for plugins.py

Improvement to the tests currently being run on ``plugins.py``

related #644 
An alternative is to cache the plugin counts per platform (since that's what we're ultimately interested in). E.g.
```python
{
    'linux': {
        'audioinput': 2,
        'audiomixer': 3,
        ...
    },
    'linux2': {
        ...
    },
    ...
}
```

You could also use a fixture.

```python
@pytest.fixture(scope="module")
def plugin_platform_counts(self):
    # build up cache
    return cache
```