Bugfix: reading adminport's request body.

- updated test case to simulate this bug.
- little bit of refactoring in unit-test cases.

Patchset3:
- Handle EOF from Read

Patchset4:
adminport: fail safe statistical count.

Change-Id: I51695499bb27062e904e81dfdafd46e788d7e269
Reviewed-on: http://review.couchbase.org/39046
Reviewed-by: Deepkaran Salooja <deepkaran.couchbase@gmail.com>
Reviewed-by: Pratap Chakravarthy <prataprc@couchbase.com>
Tested-by: Pratap Chakravarthy <prataprc@couchbase.com>