MB-9141 disallow port numbers less than 1024

I also consolidated ports validation code

Change-Id: I07bdf0a2d428fef0c62f43c22c5b09024a395617
Reviewed-on: http://review.couchbase.org/29049
Tested-by: Artem Stemkovski <artem@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>