[Bug] Missing complete exception handling in tile- and building-entity insertion

The exception handling of the SpatiaLite database when inserting tile or building entities that violate the UNIQUE constraint is incomplete in exposure-lib. Here, we have two options to tackle the problem:

  1. Given that the insert_tile_entity and insert_building_entity functions are returning the newly inserted or already existing entity with the same ID (quadkey or osm_id), I suggest to avoid the exception handling and first query the ID of the entity and only insert if it doesn't exist.
  2. Expand the exception handling to all parts of the function.

\rfc @laurens @tara @shinde

Edited by Danijel Schorlemmer