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.
I don't completely like creating a decoration using a class, due to the need to use a different name convention than normal classes, but I'm ok with this implementation.