Maintenance-mode bug-fixing.

- [NC] Refactor to centralize credential authorization/deauthorization
       in a single function.
- [NC] Deauthorize migration credentials after failures if no further
       incoming/pending migrations.
- Add NP() macro for printing possibly NULL strings.

Fixes EUCA-5967.
Merge remote-tracking branch 'origin/testing' into dev/juphoff/migration
re-indent