Implement bulk operations on the split modulestore.

Ok, I've checked that this works now. Basically, we get a single record (based on the org/course/run), and then track which branches have had new structures created for them separately (in `version_structure`).