added ns_server infrastructure for reverse jsonrpc

Change-Id: Ie2d5727235d0a05824cc7094feb0f095b7f40ca0
Reviewed-on: http://review.couchbase.org/44068
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>