Qfork: RejoinCOWPages issue with swapping
Qfork: RejoinCOWPages issue with swapping

Fix for https://github.com/MSOpenTech/redis/issues/167

RejoinCOWPages used to call QueryWorkingSetEx to figure out
which pages had been dirtied since the memory map was protected
with PAGE_WRITECOPY. But dirty pages that had been swapped out to
the system page file would be reported as not valid
(VirtualAttributes.Valid == 0) and so we wouldn't restore them into
the file map.
QueryWorkingSetEx only gives information about pages that are in the
working set at the time it is called. Pages can be forced into the
working set using VirtualLock, but that seems like a potentially
risky / expensive solution.
I implemented a solution that uses VirtualQuery to find out which
regions have changed protection from PAGE_WRITECOPY.

kts12345/redis,enginekit/redis,alpha8/redis,quangnguyen90/redis,Cybermaxs/redis,ScottKaiGu/redis,upsoft/redis,damy/redis,liqiang199105/redis,quangnguyen90/redis,damy/redis,ideaar/redis,upsoft/redis,kolonse/redis,alpha8/redis,jqk6/redis,jacklee0810/redis,Cybermaxs/redis,enginekit/redis,kolonse/redis,Jonavin/redis,jacklee0810/redis,ideaar/redis,jaambee/redis,laurencee/redis,enginekit/redis,janeasystems/redis,miminus/redis,jaambee/redis,liqiang199105/redis,enginekit/redis,janeasystems/redis,jacklee0810/redis,alpha8/redis,adamweixuan/redis,upsoft/redis,hanmichael/redis,kts12345/redis,Cybermaxs/redis,miminus/redis,Cybermaxs/redis,janeasystems/redis,upsoft/redis,janeasystems/redis,jacklee0810/redis,damy/redis,upsoft/redis,alpha8/redis,miminus/redis,adamweixuan/redis,ScottKaiGu/redis,laurencee/redis,kts12345/redis,adamweixuan/redis,janeasystems/redis,ideaar/redis,jqk6/redis,adamweixuan/redis,kolonse/redis,ideaar/redis,kolonse/redis,jaambee/redis,ScottKaiGu/redis,laurencee/redis,ideaar/redis,quangnguyen90/redis,hanmichael/redis,miminus/redis,ScottKaiGu/redis,damy/redis,enginekit/redis,damy/redis,jaambee/redis,Jonavin/redis,laurencee/redis,jqk6/redis,liqiang199105/redis,kts12345/redis,kolonse/redis,hanmichael/redis,Cybermaxs/redis,Jonavin/redis,quangnguyen90/redis,ScottKaiGu/redis,kts12345/redis,Jonavin/redis,quangnguyen90/redis,liqiang199105/redis,Jonavin/redis,jaambee/redis,alpha8/redis,jqk6/redis,laurencee/redis,jqk6/redis,jacklee0810/redis,hanmichael/redis,hanmichael/redis,adamweixuan/redis,miminus/redis,liqiang199105/redis