Spheroidal and conical shapes of ferrofluid-filled capsules in magnetic fields