[core] Move WillieMemory to tools

This lets people use it in modules. Issue #294