Port API tests in module test_permission

Subsume module `test_permission` into module `test_permission_v2`. Make the
relevant tests use the new API testing tools, not the old API testing tools.

Fix #1447.
I create a new user for every single test for the sake of isolation. The tests would probably be faster if a user was shared, but oh well.