assignsubmission_mahara: Do not die if remote user does not exit yet.
assignsubmission_mahara: Make sure accesskey is preserved during upgrade.
assignsubmission_mahara: Refactor locking logic.

This change implements the logic we agreed on at discusion on forum and Mahara
UK13.

Drafts submission (user need to click Submit button after saving draft):
    Page is not locked on remote Mahara
    Page submitted as draft is not possible to use in any other submission

No draft submission mode (or when draft has been submitted):
    Page is locked immediately on remote site.
    Page submitted as draft is not possible to use in any other submission.