Use "pid" instead of "state" for checking service.

This fixes the situation where "state" would return "0"
as the return code for a started and stopped service (Ice 3.4).
"pid" returns "1" if the service isn't running.
Merge pull request #2824 from bpindelski/rebased/develop/indexer-status

Use "pid" instead of "state" for checking service. (rebased onto develop)