Significantly speeds up highstate on windows by reducing the calls to query all services.

This removes some duplicate code and cuts running time by 1/2 on my windows boxes.