Write a program in Python to parse a complex JSON string, extract specific security log events, and format them for an alerting pipeline. Implement parse_security_events(json_string, event_types), where the valid JSON may contain arbitrarily nested objects and arrays, and matching records contain event_type, timestamp, severity, actor, and resource. Return normalized alert dictionaries for matching event types, sorted by timestamp and then event type.
def parse_security_events(json_string, event_types):