Wrap bootstrap in a transaction

- fixes racing conditions if multiple processes are starting at the same
  time

cherry-pick from https://github.com/school-scout/enumerate_by/commit/e316dfa79c5306a7f7eab7f490be15c02378b706