Add event hooks for versions; expand pagination

Allow `?version=all` requests to fire `on_fetched` event hooks. Event
hooks still disallowed for diffs because returned documents may be
incomplete. Add version number to `self` links if needed (#475).

Allow pagination of `?version=all` requests by adding query strings to
links where appropriate. As a result, this also addresses incorrect
`self` links for queries (#464).