Refactor maps JS to WP standards

Moved maps JS to a dedicated .js file so we can enqueue properly.
Created a function for populating a pins object and used
wp_localize_scripts to pass it into map-functions.js