Add maximum memory feature

This allows callers to configure Workers to respawn if they
consume too much memory.