Fixes the blank space visible in the infobox when avatars are disabled.

Review Request #10160 — Created Sept. 21, 2018 and submitted — Latest diff uploaded

Review Board
reviewboard, students

When avatars are disabled a blank space was visible on the infobox
where the avatar should be.

The code before checked if the avatar service was enabled and would
then make a request to gravatar. Now the code will check if avatar
services are enabled and if there is an avatar set.
If the services are disabled you will there will be no space
for an avatar. Otherwise, you will see a default avatar.

Python and JavaScript tests were passed.

Tested inside of Firefox and Chrome in 2 scenarios
1. Enabling avatars
2. Disabling avatars