Fix process memory iteration in Windows.
Fix process memory iteration in Windows.

PR #759 wasn't correct. VirtualQueryEx doesn't update the last error code on success, so GetLastError can return arbitrary and unrelated error codes. This commit is a simplified variant of PR #711.

VirusTotal/yara,hillu/yara,wxsBSD/yara,hillu/yara,cblichmann/yara,wxsBSD/yara,pombredanne/yara,plusvic/yara,VirusTotal/yara,cblichmann/yara,plusvic/yara,plusvic/yara,hillu/yara,rednaga/yara,hillu/yara,pombredanne/yara,tanium/yara,hillu/yara,wxsBSD/yara,cblichmann/yara,VirusTotal/yara,rednaga/yara,tanium/yara,plusvic/yara,VirusTotal/yara,tanium/yara,cblichmann/yara,rednaga/yara,plusvic/yara,cblichmann/yara,pombredanne/yara,wxsBSD/yara,VirusTotal/yara,pombredanne/yara,wxsBSD/yara,pombredanne/yara