Revert Windows service check refactoring, and replace with a different fix.
Revert Windows service check refactoring, and replace with a different fix.

This reverts commit 38bdba54a64bacec78e3266f0848b0b4a824132a, "Fix and
simplify check for whether we're running as Windows service". It turns out
that older versions of MinGW - like that on buildfarm member narwhal - do
not support the CheckTokenMembership() function. This replaces the
refactoring with a much smaller fix, to add a check for SE_GROUP_ENABLED to
pgwin32_is_service().

Only apply to back-branches, and keep the refactoring in HEAD. It's
unlikely that anyone is still really using such an old version of MinGW -
aside from narwhal - but let's not change the minimum requirements in
minor releases.

Discussion: 6320a2ea0f7f0815256ab89b3787422cee4418da@sss.pgh.pa.us
Patch: https://www.postgresql.org/message-id/CAB7nPqSvfu%3DKpJ%3DNX%2BYAHmgAmQdzA7N5h31BjzXeMgczhGCC%2BQ%40mail.gmail.com

50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,xinzweb/gpdb,adam8157/gpdb,xinzweb/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,lisakowen/gpdb,adam8157/gpdb,ashwinstar/gpdb,lisakowen/gpdb,lisakowen/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,lisakowen/gpdb,50wu/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb,greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,50wu/gpdb,50wu/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,xinzweb/gpdb,greenplum-db/gpdb,adam8157/gpdb,greenplum-db/gpdb,xinzweb/gpdb