LEGOMem: Modular Procedural Memory for Multi-agent LLM Systems for Workflow Automation