[bug 720226] Wiki permissions overhaul.

This moves all the permission checks related to documents and
revisions to a mixin in permissions.py.

All permissions are now checked off the document as:
    document.allows(user, 'action')

Includes a migration to remove no longer needed delete_document_*
permissions by locale.