Dipolar particles in general relativity