timer.Tick(), bugs and fixing unit-test cases.

CBIDXT-94: fix unit-test cases for dataport.
CBIDXT-93: use time.Tick() instead of reloading with time.After().
CBIDXT-112: dataport daemon to shutdown gracefully.

- a cleaner shutdown for dataport client.
- golint fixes.

Change-Id: If797b46de383b9a7a2f7fcd55c26c272c0e2225b
Reviewed-on: http://review.couchbase.org/40517
Reviewed-by: John Liang <johliang00@gmail.com>
Reviewed-by: Pratap Chakravarthy <prataprc@couchbase.com>
Tested-by: Pratap Chakravarthy <prataprc@couchbase.com>