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.