Don't call get_user_model in models modules

You are not allowed to call get_user_model in a models module[1]. Doing
so seems to work, but can cause circular imports in some situations,
depending on your import structure and ordering of INSTALLED_APPS. This
is because get_model loads the entire app cache, importing every model.

[1]: https://docs.djangoproject.com/en/1.5/topics/auth/customizing/#django.contrib.auth.get_user_model
Merge pull request #320 from fusionbox/get_user_model

Don't call get_user_model in models modules
Improve the performance of directory listing.

Performance is improved by no loger executing a query for each file and
folder. Now a single query is executed for gathering all of a user's
permitted ids.
The folder_qs and file_qs QuerySets filter on the user's permitted ids
=> just 3 queries required.