Factors Influencing the Antibacterial Activity of Chitosan and Chitosan Modified by Functionalization