MB-9954: Check if port is integer

Otherwise, give better error message

Change-Id: I3b4d82584882a05153d8d4224533acff0c99c58a
Reviewed-on: http://review.couchbase.org/38414
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>