[ZabbixAPIEmulator] Simplify building JSON for events

This commit also fixes following bugs:

* The JSON doesn't include an event with id == eventid_till
* Too many events are returned when the limit value is too small

test_verifyEventsObtanedBySplitWay() will fail with this code because
both the test and the testee have some problems.