entitlement: fix potential NPE in DefaultSubscription

getBaseSubscription() is null for e.g. standalone subscriptions.

This fixes #143.

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
account: remove unused billing_cycle_day_utc column

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
entitlement: integrate code review comments

Simple renaming, no functional change.

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
Merge remote-tracking branch 'origin/invoice-bcd'
entitlement: fix ordering in specific scenarii

This closes #147 and #148.

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
Fix for #145

The issue is that reparing a block/unblock invoice gives different results depending on whether the invoice sub system
is notified for for events (BLOCK and UNBLOCK) or solely at the end during the UNBLOCK. Since we support both
configuration the code needs to handle both cases.

Since the issue was in the invoicing repair layer i extracted the few repair tests we add, documented them better and added some more
around the issue found. While doing that i aslo spotted a bug in the code when adding the repair items so added more thorough tests cases
around that as well and fixed that other bug.
Merge branch 'master' of github.com:killbill/killbill
[maven-release-plugin] prepare release killbill-0.8.6
[maven-release-plugin] prepare for next development iteration