make sure that only one process can enter the migration mode
use constants for different migration status
use number of manipulated rows as idicator if it was possible to enter the migration mode
adapt test to the code changes
fix typo in var name
add comment to explain the helper function
Merge pull request #3668 from owncloud/encryption_migrate_only_once

make sure that only one process can enter the migration mode