Add a test for event inject

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Fix a defect where event.from can go into a tight loop

This puts the subscription check into the inner loop
of the event.from rather than when gathering the
snapshots. This fixes a problem where xapi would go into
a tight loop when subscribed to a particular objects
events and a different object of the same class was
updated. This tight loop also wouldn't perform the
session check so logging out the session wouldn't cause
the call to return.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
If we're not using the message switch, there can be only one xenopsd.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Merge pull request #1748 from jonludlam/event-problems

Event problems