Fix reported problems in the Advanced Portfolio report.

 - Main loop rewritten to be more robust and accurate.
 - Added option to include broker fees in basis calculations.
 - Added option to ignore money transfered to or from parent
   or sibling accounts.