Add map_free, use strcasecmp instead of stricmp

stricmp seems like its not in the posix standard
The map_free should be able to quickly free the map created by map_create