Refactor `instance.lock` to `instance.use` to reduce the ambiguity regarding a lock named "lock".
Remove the `id` off of the instance.
This is not needed and removing it reduces the need for some locking.
The thread itself is now the "id" so `id_thread` is now renamed to just `thread`.
The `controller_instance_find()` function can now just get the instance pointer.
Add a "time" controller lock check flag.
Use this to designate expecting to return `F_time` on time outs.
Add additional documentation regarding locks.
Reduce uses of locking where possible by re-organizing code.
The `controller_instance_prepare()` function, in particular, has the the code changed to reduce how long the lock is held.
This is possible because the `controller_instance_find()` now gets the instance pointer rather than an identifier.
The `controller_instance_prepare()` function allocates the instance pointer independent of the array.
This allows for the write lock on instance to be only used when assigning to the array.
The instance must therefore be immediately freed on any error because it is not assigned to an array and cannot be auto-deallocated.
Add missing locks to areas where the locks should be, such as a read lock while reading the dependency rule status.
Make sure `instance.active` lock is set before calling `instance.use` locks (there may be more work needed regarding this).
Try to reduce how long `instance.use` are held (there may be more work needed regarding this).