Evolution of mitochondria reconstructed from the energy metabolism of living bacteria