Fix coverity erro (CID 349552) double lock (#6970)
* dim_template_fix: Fix lock We had a double lock before, this commit fix this * dim_template_fix: Fix order This commit fix the order process * dim_template_fix: Return I am returning for the first solution, because the others are generating: * dim_template_fix: Try to lock This solution try to lock the host before to move in front * dim_template_fix: Move chart lock To avoid the chart to be deleted while we are linking the alarm I am moving bak the chart lock * dim_template_fix: Fix grammar This commit fixes the grammar of an error message * dim_template_fix: bring pattern Bring the defined pattern to the code and use netdata_rwlock_trywrlock * dim_template_fix Fix format This commit fixes a format missing