Imporove db.sqlalchemy.api._validate_unique_server_name method

This method is called by instance_create and instance_update.
If parameter CONF.osapi_compute_unqiue_server_name_scope is set to
'global' or 'project' then it has terrible performance.

Algorithm was next:
1) Get all instances and all connected data (5 joinloads..) in global
   (or project).
2) Compare hostname with hostnames in instances (locally)

Now:
1) Get only count of instances with same hostname in global (or project).
2) If count > 0 raise Exception.

Change-Id: I35ea121c3f906b4fff11c38bafa2ab33200bd6b2
Merge "Imporove db.sqlalchemy.api._validate_unique_server_name method"
Merge remote-tracking branch 'm_src_repo/master' into build-temp