invoice: payment: refactor rounding logic

Respect the correct amount of decimal places for each currency.

Note that upgrading an existing system with that patch can yield to
non-deterministic results as the pro-ration code has been changed to
support 9 decimal places: this will lead to different pro-ration amounts
due to rounding.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Merge branch 'master' into new-amount-decimals-handling-rfc
util: add missing copyright header

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Prototype implementation for invoice rework (tree of items instaed of addhoc code all over the place)
Invoice repair logic (additional partial implementation)
Fix typo for currency precision config file
Merge remote-tracking branch 'origin/master' into new-amount-decimals-handling-rfc

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>

Conflicts:
	beatrix/src/test/java/com/ning/billing/beatrix/integration/overdue/TestOverdueIntegration.java
Merge remote-tracking branch 'origin/new-amount-decimals-handling-rfc' into new-amount-decimals-handling-rfc
Initial integration of the invoice tree generation and removal of old repair logic in DefaultInvoiceGenerator
Also, disable test testOverdueStagesFollowedWithImmediateChange2 (already disabled in master) and remove old beatrix 'full repair' tests which are not supported anymore.
Temporary commit for invoice tree rework
Implementation of invoice tree logic to handle both creating view of existing items and merging with proposed item list.

There are a few changes introduced from the previous code:
- Full repair code has been deleted -- was only there for regression test purpose
- Pro-ration logic when calcultaing repair items gives a slightly different result-- and i think more accurate
- Handling of invoice item along with repair has also changed

Tree looks stable at this point, but more work (cleanup, refactoring and tests are needed)
Cleanup unsued code from invoice generator
Rework some of the logic for the invoice item tree
Javadoc for the invoice item tree
Merge remote-tracking branch 'origin/master' into invoice2
Fix issue with 1.6 compiler
Add test for testing code path where we insert proposed items out of order
Fix parent pointer in invoice tree node
Fix issue in rebalance
Initial unit tests for NodeInterval class
Merge remote-tracking branch 'origin/invoice2' into new-amount-decimals-handling-rfc

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>

Conflicts:
	beatrix/src/test/java/com/ning/billing/beatrix/integration/TestBundleTransfer.java
	beatrix/src/test/java/com/ning/billing/beatrix/integration/TestIntegrationInvoiceWithRepairLogic.java
	beatrix/src/test/java/com/ning/billing/beatrix/integration/overdue/TestOverdueIntegration.java
	invoice/src/main/java/com/ning/billing/invoice/generator/DefaultInvoiceGenerator.java
	invoice/src/test/java/com/ning/billing/invoice/dao/TestInvoiceDao.java
	invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGeneratorRepairUnit.java
NEWS: prepare for release

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
[maven-release-plugin] prepare release killbill-0.8.13
[maven-release-plugin] prepare for next development iteration