Decrease amount of queries while adding aggregate metadata

Dict of aggregate metadata sometimes contains a lot of items,
so while adding of metadata current implementation make a lot
of inserts in database.

Using multirow INSERT instead of INSERT statement allows to
decrease amount of queries to one single query per operation.

Change-Id: I6b842459cf198f8577b615aeba091723dcb18429
Merge "Decrease amount of queries while adding aggregate metadata"