Write a function to parse and validate complex nested configurations for Zephyr AI, ensuring optimal time and space complexity.
Implement parse_and_validate(config_text, schema), where config_text is a JSON string and schema is a nested validation schema. Return (True, parsed_config) for valid JSON that matches the schema, or (False, None) for malformed JSON or validation failure. Support object, array, string, number, boolean, and null types, plus required object fields, nested properties, array items, and enum; object fields not listed in properties are invalid.
def parse_and_validate(config_text, schema):