refactor function copying code into llvmutil
When extracting a module, copy only the functions that are requested and their dependencies,
rather than copying the entire module. Fixes #72