Added hook for restoring geofences when db is restored.
Added check for empty cursor in event store getalarmid.
Merge Fix