Refactored code for use as a library

This PR allows the communicator to be used as a standalone CLI tool or included in another project as an imported library. Currently, as all packages are contained within `main` this package cannot be included in other libraries (see https://travis-ci.org/mefellows/packer-winrm-shell/jobs/42291291#L116 as an example build failing).

Builds fail with errors like below:

```
imports github.com/dylanmei/packer-communicator-winrm/communicator/winrm: cannot find package "github.com/dylanmei/packer-communicator-winrm/communicator/winrm" in any of:
/usr/local/go/src/pkg/github.com/dylanmei/packer-communicator-winrm/communicator/winrm (from $GOROOT)
/home/ubuntu/go/src/github.com/dylanmei/packer-communicator-winrm/communicator/winrm (from $GOPATH)
```