Extract publish task logic from grunt-gh-pages

Hey Tim. Sorry for the massive pull request, I know how annoying these can be :)

This PR is basically porting all the logic from grunt-gh-pages but removing the dependency on grunt, apart from the utils for now. I've begun trying to port the tests across, but that's going to be a bigger job, so I thought I'd better check in first. There's still lots of work that could be done, but I was hoping to get this into a useable state on npm.

I'm using this work right now in an uncommitted Gulpfile, which looks like this:

```js
gulp.task('deploy', function(done) {
  ghpages.publish({
    base: path.join(__dirname, 'dist'),
    logger: console.log.bind(console)
  }, done);
});
```

I'm really keen to help push this over the line so I can use it in my projects, so please let me know if there's anything else I can do to get this onto npm.