support listeners for events

Change adds two methods to client:

- AddEventListener adds a channel to receive *APIEvents
  If this is the first listener, event monitoring is started.
- RemoveEventListener causes a channel to no longer receive *APIEvents
  If this is the last listener, event monitoring is stopped.
correct logic error on disabling monitoring
fixed some race conditions
caught closed chanel
do some fix for testing
Make uname return an error on windows instead of failing to compile because the function doesn't exist
Merge pull request #84 from edrocksit/master

Compile on windows
authors: add Ed
testing: add bind parameter to the NewServer function

This parameter will be used to specify the address where the server will
start to listen.

Closes #83.
Merge branch 'master' of git://github.com/cheneydeng/go-dockerclient

Conflicts:
	testing/server.go
testing: added PrepareFailure which force a failure for some api calls
testing/server: fix WaitContainer

ops! x)
Merge branch 'events' of git://github.com/jhulten/go-dockerclient

Conflicts:
	testing/server.go
engine: fix go vet issues
event: add some docs and improve the channel handling
all: fix some golint warnings
Add signal to KillContainer

Comes from
Issue: https://github.com/dotcloud/docker/issues/4549
PR: https://github.com/dotcloud/docker/pull/4576
client: do not return invalid endpoint for tcp:// scheme

Fix #90.
added Tag to PullImageOptions

Signed-off-by: Francisco Souza <f@souza.cc>
authors: add Luca Clemente