DVPL-3313: splunklib | Improve the SDK to make it easier to talk back to Splunk's API from within a modular input or custom search command

Part 1: splunklib.searchcommands

Added SearchCommand.service property that returns a service object or None. Verified with automated unit tests and ad-hoc integration tests.

The service object is created from the Splunkd URI and the  authentication token passed to the command invocation in the search results info file. This data is not passed to a command invocation by default. You must request it by specifying this pair of configuration settings in commands.conf:

    enableheader=true
    requires_srinfo=true

The enableheader setting is true by default. Hence, you need not set it. The requires_srinfo setting is false by default.  Hence, you must set it. If either enable header or requires_srinfo are false, SearchCommand.service will return None.

The service object is instantiated with these arguments.

    Service(
            scheme=splunkd_protocol, host=splunkd_host,
            port=splunkd_port, token=auth_token,
            app=ppc_app)

The arguments are obtained from SearchCommand.search_results_info.

Signed-off-by: David Noble <dnoble@splunk.com>