Fix bug in RangeSetGet()

If RangeSetGet() was invoked when the cursor just happened to be pointing at
the correct singleton range than that range was not removed and an ASSERT was
hit. This patch fixes that problem.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Fix 'unreferenced parameter' warning checked builds

Free builds have that warning disabled.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Better way to ignore assertions in free builds

Disabling warnings is not a great thing to do so define an inline function
to take the assertion expression as an argument and then declare its
argument to be ignored.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Various fixes in improvements to the XEX.SYS System module

- Improved error handling. Various errors were ignored before.
- Moved several globals inside scope of __SystemGetCpuInformation since
  that's the only place they are used.
- Added a call to free memory range information. It was leaked before.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Merge pull request #17 from pauldu/master

Miscellaneous fixes and improvements

Approved-By: Ben.Chalmers@citrix.com