fix inlines for django1.6 (see
https://github.com/django/django/commit/3aad955ea8db1592fad0012155eaa25b72e50dc5)
compatibility fix for django 1.6
fix check_constraints to ignore the PopupMiddleware if Django is greater
than 1.6
added optional cache in db options