[#847] Add a factoriy for creating test sysadmins

..and use it in the example_iauthfunctions tests. Also use the normal
user factory in the tests.