[FIXED JENKINS-24316] Make user name migration work.

**Please review this PR and consider it for merge into RC.**

This fixes the migration of user profiles into the folder names expected by the active ID strategy on case-sensitive file systems, tested both on OS X with case sensitive HFS+ and CentOS. And more logging is always good.

I needed to fix a few tests that should have broken a long time ago. I assume this is the result of the change to line 409/412 which is assumed to be an oversight of the previous author: It seems weird to initialize the user with possibly non-canonical ID. Not sure about this, **so please review and confirm**. This PR should work to resolve the issue reported above without this change, if it's considered unsafe to include.