........S. [ZBXNEXT-581] DBcopy_template_items() refactoring (2/2)

Moved DBcopy_template_items() and related functions into separate file