Change delete to splice for allMarkersTasks

As the marker tasks are being stored as a continuous array, using delete
will just delete the value and won't shift the elements ahead of that
index to one step back, and thus the size of the array won't change even
after a delete. But using splice will do the job.