Make decorator `skip_if_bug_open` more flexible

Make it possible to use decorator `skip_if_bug_open` on either test methods or
test cases. As part of this effort, move some business logic from
`skip_if_bug_open` to a helper function, and expand the set of tests in
`test_decorators.py` to exercise this new helper function.
An alternative approach goes like this:

```python
def __init__(self, *args, **kwargs):
    try:
        _maybe_skip_test(bug_type, bug_id)
    except SkipTest:
        type(self).__unittest_skip__ = True
    return super(Replacement, self).__init__(*args, **kwargs)
```

This approach has the advantage of making the unit test framework skip the entire `TestCase` subclass, instead of each individual method via `setUp`. However, this approach has (at least?) two downsides:

1. It manipulates data which is supposed to be private to the unittest library.
2. It is less clear to the reader.