SSP-1899 Enhance API test framework and add a complete reference test

This commit adds a more reliable login functionality. Adds support in the future for different logins with permissions for testing authenticated methods more reliably. Finally, this finishes off one reference test with most of the common work done in a common class so that standard reference test classes can be created quickly.