Use grouped_slice on get_lines_to_pay

issue4321
review6651002

--HG--
extra : rebase_source : a8e847dc2c62e71aca7637097a3a114e93fd894b