CA-100000: Don't use lexicographic sort when sorting events
CA-100000: Don't use lexicographic sort when sorting events

Bug introduced during rpc-light integration. The type of 'id' was
changed from an int to a string, and the type checker used to fix
the code. Unfortunately there was a sort function using the
polymorphic 'compare' function. The compare thus changed from an
integer comparison to a lexicographic compare on the string
representation of the integer. The observable result in this case
was that e.g. event '1000' was 'older' than event '999' and was
GCd. Elsewhere, the correct integer comparison was being made and
this caused the event.next to raise 'EVENTS_LOST'.

Signed-off-by: Jon Ludlam <e7e3380887a8f95cc9dc4f0d51dedc7e849a287a@eu.citrix.com>

koushikcgit/xcp-networkd,johnelse/xcp-rrdd,djs55/xcp-networkd,simonjbeaumont/xcp-rrdd,koushikcgit/xcp-rrdd,sharady/xcp-networkd,simonjbeaumont/xcp-rrdd,koushikcgit/xcp-networkd,djs55/xcp-networkd,sharady/xcp-networkd,djs55/xcp-rrdd,djs55/xcp-rrdd,koushikcgit/xcp-rrdd,koushikcgit/xcp-rrdd,johnelse/xcp-rrdd