Properties of chitosan/magnetite nanoparticles composites for efficient dye adsorption and antibacterial agent