Fix various niggling problems

Nothing substantial here, just a bunch of little fixes for things that annoyed me when I was doing the extensive button-renaming exercise yesterday. Fixing them now so that things don't keep getting worse.

Main points:

* Use `foo` instead of `self.foo`
* Use `delegate` where possible
* Extract common code into methods
* Use meaningful expressions instead of magic numbers
* Use named scopes instead of passing parameters
* Change names to be less arbitrary and/or confusing (`workflow_state` -> `state`, `scrapable` -> `for_scraping`)