Effect of bilayer stacking on the atomic and electronic structure of twisted double bilayer graphene