Chitosan gels: 2. Mechanism of gelation