MDL-34055 add bulk DB->insert_records() method

This patch was inspired by patch by Simon Coggins from Totara.