Convert testcases from ad hoc perl test infrastructure to ATF

While here, fix issues with determinism as shown in bug 191191

Sponsored-by: EMC / Isilon Storage Division