GitPoller: Allow polling all branches, or a filtered subset of branches.

The make the ``branches`` argument accept either ``True`` to poll all branches,
or a callable to filter the remote branches.

(Pull request based on @jhol's comment in #597)