Import updates to io.ml from xs64bit-ring3 from Simon Beaumont

Signed-off-by: Simon Beaumont <simon.beaumont@citrix.com>
Committed-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Partial revert of 9ccef3ed2505ff47ea2f601308bf0e8a988c6a11

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Revert of ef3bf4bdfb3ccbe1b54c0514a53777a1dc43ece2

With a slight change to Io.read_int invocation

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Fix invocation of write_int following interface change

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>