move helpers into RT::Test from a test file
validator: create Principal in force resolve mode

If principal is missing in {Group,User}->Principal relation then
user have two choices: delete pointing object or create
new principal record. It was decided to do nothing in auto-force
-resolve mode. However, absent principal means that $group->Disabled
returns undef and we use that call in other places. undef may cause
infinite loop while trying to restore other records, for example CGM.

prompt_action is only used in this place, so it's ok to change its
behavior.
test edge case in validator
Add a timeout to prevent failing inifite loop tests from hanging forever
Merge branch '4.0/restore-principal-in-validator' into 4.0-trunk