Gleason's Theorem on Self-Dual Codes and Its Generalizations