Issue 1459 avatar functional tests

This depends on #1512 (only the last commit is for this PR). This mocks out some client side functionality, like capturing webcam images and selecting a file from the filesystem.

Fixes #1459.
Fixes #1494.
Ehh, if anything, I'd refactor things to expose more high level properties to indicate certain states. IMO functional tests shouldn't be that dependent on implementation details. Let's file a separate bug if unit tests are not sufficient for testing these behaviors.