PR/228: Fix magic deallocation when the magic file is not mmapped. This is the
case for windows.
re-do the map and allocation of magic entries to simplify things
- always initialize ml->map
- free map
check for the right magic_version()