geli: factor out some common code in the geli tests
No functional change.
MFC after: 2 weeks Sponsored by: Spectra Logic Corp