Write tests for avatar upload

- Uses the new avatar upload url
- Adds tests that were pending for avatar upload
- cleans up use of the params method

This commit depends on [discourse/discourse #3024](https://github.com/discourse/discourse/pull/3024)