Refactored commands, should not affect funcionality

 * Moved common code for sync_schemas and migrate_schemas into common.py

 * No need to call .count() on sync_shemas(). They will iterated through
   anyway. If there is no_tenant, `if all_tenants` evaluate False immediately.

 * no need to call .all() after .exclude(). It's already a queryset.

 * about self.stdout.write:
   https://docs.djangoproject.com/en/dev/howto/custom-management-commands/

 * made some small cosmetic changes
Fixed import from previous commit
both methods need clear cache, so do it before calling them
`True and something` will be always evaluated to "something". It was probably a typo.
Merge branch 'master' into refactorings
Move SyncCommon to the right place
Small fix in migrate_schemas command
Missing statement, input did not worked on Python 2.7
Merge pull request #68 from Walkman/refactorings

Refactored commands, should not affect funcionality