Working on deferred updates

The idea behind is to keep in track of all references, and to give a faster way of updating it via backend (to avoid slow updates)
Avoid trigger @Reference update twice

When there is a @SingleCollection parent class some actions were trigger twice
Improve things
Moved templates into other files
Added worker($update=true) to update
Remove from the queue when it is done
Added tests for deferred references
Improved @Deferred

1. Keep in track of every change as in non deferred references, but instead of applying them it is queued until some worker can pick them up.
2. The worker produces one *update* per document and now it works with nested objects (even duplictes)
3. All operations in the worker happens using primary key to avoid locking
Merge branch 'feature/reference-deferred' into develop