Further refactor skip_if_bug_open, skip failing tests

Again, the two commit messages spell out the changes herein pretty well. The highlights:

* Further refactor `@skip_if_bug_open`. Push much of its internal logic out into separate functions and test those functions.
* Use the new functions to skip some tests which are known to fail. This change turns five failures into skips.