test_events_plugin.sh: Assert for expected events count

Rather than asserting for expected events to be in a specific order,
assert for the event count of each desired type. Also, fix an issue
where the commands to capture events were killed improperly when the
desired number of events are captured.

Change-Id: I1ed2e8fd6af469c7c2cbbb73170c8025918ae694
1 file changed