Support pagination in /api/<team>/<project>/poll

The web interface calls this API, parameterized with `?p=$p` where `$p`, so I assume pagination is the expected behavior.

Our specific use-case is enumerating the event groups in a project; that obviously doesn't work without this change.

If my assumption is wrong and returning unpaginated data is the requirement then please close the PR. In that case a hint on how to get the number of event groups in a project would be most welcome.