use-multi value insert to speedup data persistence

In this patch I reworked the save() method to use multi-value inserts instead of prepared statements.
this reduces the number of sql queries issued to by a factor of 250.

we measured a considerable speed gain for requests which took 10-20 seconds without this patch to 500ms when this patch is applied.