Bianchi type-I string cosmological model in the presence of a magnetic field: classical versus loop quantum cosmology approaches