Refactor, clean up, and fix label and milestone importing

Yuck! The old code was horrible, and I didn't even notice it! (in my
defence, I didn't even write that old code. It was there when I got
here)

The new changes also fix the "unable to import milestones" issue:
 * https://github.com/IQAndreas/github-issues-import/issues/4