support per environment/context configs in compile and factory config handler
refs #72