Multi-level Contrastive Learning for Script-based Character Understanding