Fix worker reconnect handling.

Instead of forgetting active workers, keep track of them and purge
them if they don't respond in the maximum heartbeat time.

This change requires workers to heartbeat if their job will take
longer than the maximum configured heartbeat interval.