Use input dialog for setting nickname

Based on a patch from Michael Rose.

It appears that this dialog renders a lot better on OSX in Adium than
the one that I was using originally.
Adapted to new Tox API
Fixed set nickname crash
Merge with upstream