Fixes some oddities with the logic of removing events
Sets pending events before attempting to send them

- This makes the EventStore database more robust. We don’t try to resend
pending events.
- If there's a failure, we remove the pending flag and then try it again
  in the next attempt.
- Mainly helpful when using SnowplowBufferInstant.
- Added setPendingWithId, removePendingWithId & getAllNonPendingEvents
  to SnowplowEventStore to suppor this with appropriate changes to
  SnowplowRequest.