Close gocode daemon at emacs exit

Register a kill-emacs-hook to run 'gocode close' when emacs exits.

The hook is not registered if the daemon unix socket already exists,
assumes gocode daemon was running before go-mode was loaded.
Use company-grab-word instead of a regex

The regular expression being used here doesn't always give desirable
results.

Example:

```go
thing := OtherThing()
thi // won't autocomplete to `thing`

type Foo struct {
   Bar string `bson:"foo"`
}

foo := Foo{}
foo.B // will autocomplete to `Bar`
```

Because it has a hard `.` anchor in it, it will only ever match methods
or attributes and never local variables, even though `gocode` itself
would complete both cases fine. Changing it to `company-grab-word`
satisfies both cases because we get a matching prefix.
Merge branch 'fix-company-mode-prefix' of https://github.com/bradleywright/gocode