Fix ordering of conditional offers

Offers by default are sorted using Meta class ordering. However,
`get_offers` was doing two queries and combining them together.
Effecitvely bypass the ordering.

Test for ordering basket offers was written in the process not being
aware of standard ordering. I left it there as it can be useful test in
future (when somebody removes standard ordering).

Fixes #964
Merge pull request #964 from tangentlabs/issue/964/offer-priority

Respect priority of ConditionalOffers
Merge pull request #1030 from mbertheau/contain-productimages-z-index

Create a new CSS stacking context for dashboard's upload-image class
Permission fix for dynamic dashboard navigation

The code assumed that an application instance and it's views have the
same parent module. This is not necessarily true, as one can customise
either just a view or just an app.
The fix consists of always using get_class to load the application
instance.

@mberthau pointed out the issue and provided a first fix in #993 and #1034.
Raise ValueError when product has no stockrecord

When adding product to basket, Oscar expects that strategy provides
stockrecord. If there is no stockrecord, strange errors are raise, e.g.
NoneType has no attributed id.

This patch provides a more meaningful error.

Fixes #1037
Add correct CSS for date picker

It was using a incomplete bootstrap-datepicker.css. I couldn't find a
better suited replacement, so just switched to an okay looking JQuery UI
theme.

Also switched to the minified version of JQuery UI.
Upgrade timepicker to current version

As part of reviewing datetime pickers, it seemed sensible to bump to the
current version.
Merge branch 'easily-add-new-formset-to-product-update-page' into machtfit

* branch easily-add-new-formset-to-product-update-page:
  Provide a hook for cross-form validation
  Make it trivially easy to add more formsets to the product update page
  Unify __init__ method signature of formset classes
  customize FormSet class after calling inlineformset_factory
  Whitespace, Formatting, PEP8

https://github.com/tangentlabs/django-oscar/pull/1022

merge dashboard-fix-custom-permissions
https://github.com/tangentlabs/django-oscar/issues/993
https://github.com/tangentlabs/django-oscar/pull/1034
Merge branch 'origin/issue/992/datetimepicker' into machtfit

* branch origin/issue/992/datetimepicker:
  Upgrade timepicker to current version
  Add correct CSS for date picker

https://github.com/tangentlabs/django-oscar/pull/992