Clean up multiprocessing.Pool after use in _map_parallel

The pool created for multiprocessing in model._map_parallel() was not
being cleaned up after use, which could potentially leave lots of
abandoned Python processes and unclosed files.