A study of the Chamaeleon I dark cloud and T-association – VI. Interstellar polarization, grain alignment and magnetic field