Refactor Getopt class

Fixup some warnings from IntelliJ

Change-Id: Ib05f366fd5e9b1a11713902eda45121038cace08
Reviewed-on: http://review.couchbase.org/27677
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>