Set session and power managers to null in test mode.

Prevents shutdown/reboots.