Added function to insert location.

addLocation returns locationId of existing location in database,
otherwise the new location is inserted and the locationId is returned.