refactoring cbtop main module

Change-Id: Ifb60ca3ab76078d362389a9f7655ac01ce767b3f
Reviewed-on: http://review.couchbase.org/24106
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>