quicktest: add a test case for parallel calls to event.from

Sophisticated clients like CloudStack will issue parallel calls to
event.from, looking for different conditions. These calls should
not interfere.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>

Conflicts:
	ocaml/xapi/quicktest.ml
Import xapi_event.ml from trunk

Fixes an issue where parallel event.from instances on the same
session_id can conflict, leading to a SESSION_INVALID exception

This brings xs64bit-ring3 up to trunk c/s
bedca96adfcfdadd2e2e8c2c8b5158b6e5a115bf

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
CA-100400: Store the event size alongside the event in the event.next queue

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
CA-100400: GC event queue based on size rather than number.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
CA-146736: Fix event registration after pool_migrate_complete

After running pool_migrate_complete, make sure the xapi events thread
re-registers so as to watch events for the newly-arrived VM.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1952 from johnelse/events-fixes-xs64bit

XAPI events fixes