Improvements to spatial search tab

Extracted common JS functions into separate JS file. Included a WKT
import function.
Refactor map draw JS code

Common functions removed from _map.gsp and imported from map.common.js
Increment version to 0.49