Optimization of RegionDB::add_region methods.

- create separate private methods for insert region, update dimension
and testing of existing region.
- use these methods in add_region methods