Add ability to pass context to addAction() and addFilter()

Also includes a few more tests and a tweak to how priority is documented.