Fixed database removal of events with GET requests

- We weren’t making a copy of dbIndexArray to iterate from
  to remove the events from the table.
- This also fixes the same issue in POST
- Fixes #54