Optimised the hostname changing activity a little. Split out some hard
coded strings. Made the main ASyncTask run a switch statement rather than
if statements. Added an enum for the "states" passed to the ASyncTask so
that I could use a switch. Removed some unnecessary recreating of the
activity.