make sure that only one process can enter the migration mode
use constants for different migration status
adapt test to the code changes
use number of manipulated rows as idicator if it was possible to enter the migration mode

Conflicts:

	apps/files_encryption/lib/util.php
fix typo in var name
add comment to explain the helper function