accounting: support more cases of grouping internal invoices

The logic to guess groupable lines was considering source of
destination side of an accounting transaction depending on
preferences. This was not good, for two reasons:
 - with internal transactions we want to consider both the source
  and the destination
 - if user preferences are mis-configured, grouping would not work.

switch to a logic where we consider both source and destination
sides to prevent these problems.
Status Job ID Name Coverage
  External
running SlapOS.Eggs.UnitTest-Master.Python2

12917:06:44

running SlapOS.Eggs.UnitTest-Master.Python3

12917:17:59