Wrote tests for current RegistrarName methods.

Finished writing tests for RegistrarName._request_json() and
RegistrarName.get_current_ip(). Had to tweak those methods as well.

Also sorted imports and removed empty lines from the end of a couple of
files.