Balance ENTER with a LEAVE for all exit points.

For xaccLotFill and xaccLotScrubDoubleBalance, anyway.
More ENTER/LEAVE corrections at function exit points
Small corrections in doxygen comments
Remove superfluous include statements
Move account type checking functions into the engine
Widen the scope of the subsplit merge scrub function

When used in a strict sense it will only merge splits
that are marked as subsplits of each other.
In relaxed mode it will merge any split two splits that
are both in the same lot and the same transaction.
Add scrub function to reduce the amount of lot links used.

Only lot links between two or more document lots must remain.
All lot links between document and payment lots can be scrubbed.
Refactor scrub_doc_pay_link into scrub_other_link and make it more generic

It can now be used both to
- move a payment to a document lot (its original use case)
- move a refund to a payment lot or the other way around
Tweak the get_pay_split function to prefer the best possible match
Handle the case of scrubbing a lot link between two non-document lots
Refactor gnc_doc_doc_link into gncOwnerSetLotLinkMemo and move it

It can now be used both for scrubbing and when applying payments
Refactor gncOwnerReduceSplitTo out of reduce_biggest_split

It can now be used both for scrubbing and when applying payments
Refactor get_pay_split into gncOwnerFindOffsettingSplit

In this form it can be used both for scrubbing lot links and for adding new payments
Rewrite invoice payment logic to fix lot link proliferation

- most payments will behave is it did in 2.4.x
- when two or more documents are involved in the payment
  a lot link between those document lots will be created
Make scrub in lot viewer scrub business lots using the new scrub functions.