[feature/twig] New Twig filter, subset

This filter grabs a subset of a loop for output (according to past
functionality).

PHPBB3-11598