Import modules (not classes) where possible
Checkout index view enforces basket must be non-empty

This change introduces a new framework for enforcing checkout
pre-conditions. Each view class can define a class attribute
'pre_conditions' which lists method names to run before the class
itself.

Of course, decorators are more conventional for this kind of thing but
they are harder to override and customise.
Add tests for checkout shipping address view pre-conditions
Add tests for checkout shipping methods view pre-conditions
Extract core events into mixin to clean up tests
Add tests for checkout payment method view pre-conditions
Add tests for checkout payment details view pre-conditions
Remove get_error_response method

It is replaced by the new pre-condition checking.
Remove deprecated methods from checkout components

There were slated for removal in 0.6. The release notes contains info on
what replaces each method.
Rework get_context_data for checkout views

They now all use the same system as PaymentDetailsView where the
submission dict is built and used to form the data for the template.
This should be more consistent and simpler than the previous impl.
Extend PaymentDetailsView to make handling invalid payment forms easier

This change introduces a few new methods in the `PaymentDetailsView` so
less core code needs to be overridden if custom payment forms are
required.
Remove can_basket_be_submitted method

It is now replaced with a checkout pre-condition that applies to every
checkout view. If someone's basket becomes invalid while they are in
checkout, then they will be redirected back to the basket page.
Use a better warning message when baskets become invalid during checkout

Also make the availability warnings start with a lowercase char so they
can be embedded in other sentences easily.
Pass the payment_kwargs back to checkout error responses

This means a payment details form can be rendered with its data intact if
the overall payment process doesn't work (eg the customer got the wrong
CVV).
Move a few methods to OrderPlacementMixin

This simplifies the PaymentDetailsView further.
Adjust checkout flow to better handle billing addresses

This change splits up the flow within the old `post` method. It makes
things easier to override with less duplication from core.
Adjust demo site checkout to use new system
Adjust demo site to collect a billing address

Also show billing address on the thank-you page (if one was saved).
Add details of checkout changes to v0.7 release notes
Add checkout pre-condition for ensuring payment details are collected

This is required for the preview view which can be loaded via a GET
request normally. However, if a payment details view requires forms to
be submitted, then we want to ensure that you can't skip this step by
simply entering the URL of the preview view.

This change allows a `check_payment_data_is_captured` method to ensure
all information is entered before loading the preview view.