Made sure that the task_ids are stored in the performance table soon enough

This is needed to enable the task revoking feature https://bugs.launchpad.net/oq-engine/+bug/1180271